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.
This commit is contained in:
committed by
Alex Smith
parent
ccadfaeeb5
commit
69a8b95491
@@ -32,7 +32,7 @@ struct preloaded_image {
|
||||
uint8 elf_class;
|
||||
addr_range dynamic_section;
|
||||
|
||||
FixedWidthPointer<const char> debug_string_table;
|
||||
FixedWidthPointer<char> debug_string_table;
|
||||
uint32 num_debug_symbols;
|
||||
uint32 debug_string_table_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user