History log of /haiku/headers/private/kernel/util/FixedWidthPointer.h
Revision Date Author Comments
# 69a8b954 23-Jun-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

FixedWidthPointer: Fix ==/!= operators, remove OtherType casts

* FixedWidthPointer:
- operators ==/!=: Change second operand type from void* to const
Type*. Also add non-const version to resolve ambiguity warning when
comparing with non-const pointer.
- Add Pointer() getter.
- Remove templatized cast operators. They are nice for casting the
pointer directly to another pointer type, but result in ambiguity.
* Make preloaded_image::debug_string_table non-const. Avoids clashes of
the const and non-coast FixedWidthPointer comparison operators. A
cleaner (but more verbose) solution would be to spezialize
FixedWidthPointer for const types.


# 3a2a3367 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Support static_cast on FixedWidthPointer.


# 62d36f98 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Removed the addr_t conversion operators from FixedWidthPointer which makes comparison against NULL work properly.


# 6b87898a 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Code style fixes.


# d8efc6ca 21-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Changes to kernel_args to make it identical for x86 and x86_64.

* Added a FixedWidthPointer template class which uses 64-bit storage to hold
a pointer. This is used in place of raw pointers in kernel_args.
* Added __attribute__((packed)) to kernel_args and all structures contained
within it. This is necessary due to different alignment behaviour for
32-bit and 64-bit compilation with GCC.
* With these changes, kernel_args will now come out the same size for both
the x86_64 kernel and the loader, excluding the preloaded_image structure
which has not yet been changed.
* Tested both an x86 GCC2 and GCC4 build, no problems caused by these changes.


# 69a8b95491c160f03a5b0dab0fa8d1899fe42d4b 23-Jun-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

FixedWidthPointer: Fix ==/!= operators, remove OtherType casts

* FixedWidthPointer:
- operators ==/!=: Change second operand type from void* to const
Type*. Also add non-const version to resolve ambiguity warning when
comparing with non-const pointer.
- Add Pointer() getter.
- Remove templatized cast operators. They are nice for casting the
pointer directly to another pointer type, but result in ambiguity.
* Make preloaded_image::debug_string_table non-const. Avoids clashes of
the const and non-coast FixedWidthPointer comparison operators. A
cleaner (but more verbose) solution would be to spezialize
FixedWidthPointer for const types.


# 3a2a3367dc9bec2a5fbcd4ac849da6ac65e74e79 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Support static_cast on FixedWidthPointer.


# 62d36f98331067e472188f6c020c2ccd808f48cf 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Removed the addr_t conversion operators from FixedWidthPointer which makes comparison against NULL work properly.


# 6b87898af5966561770a79a17f13415c47c38aa0 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Code style fixes.


# d8efc6caf6babe278c48e8aa3277376fb68ff455 21-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Changes to kernel_args to make it identical for x86 and x86_64.

* Added a FixedWidthPointer template class which uses 64-bit storage to hold
a pointer. This is used in place of raw pointers in kernel_args.
* Added __attribute__((packed)) to kernel_args and all structures contained
within it. This is necessary due to different alignment behaviour for
32-bit and 64-bit compilation with GCC.
* With these changes, kernel_args will now come out the same size for both
the x86_64 kernel and the loader, excluding the preloaded_image structure
which has not yet been changed.
* Tested both an x86 GCC2 and GCC4 build, no problems caused by these changes.