Skip to content
Snippets Groups Projects
Commit 83237f87 authored by James Cook's avatar James Cook
Browse files

Allow large paramblocks by converting mEnclosingBlockOffset to U16, needed for

location_input.xml
parent 67c832d9
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ namespace LLInitParam ...@@ -46,7 +46,7 @@ namespace LLInitParam
{ {
const U8* my_addr = reinterpret_cast<const U8*>(this); const U8* my_addr = reinterpret_cast<const U8*>(this);
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block); const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
mEnclosingBlockOffset = (S16)(block_addr - my_addr); mEnclosingBlockOffset = (U16)(my_addr - block_addr);
} }
// //
......
...@@ -300,14 +300,14 @@ namespace LLInitParam ...@@ -300,14 +300,14 @@ namespace LLInitParam
const U8* my_addr = reinterpret_cast<const U8*>(this); const U8* my_addr = reinterpret_cast<const U8*>(this);
// get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class
return *const_cast<BaseBlock*>( return *const_cast<BaseBlock*>(
reinterpret_cast<const BaseBlock*>(my_addr + (ptrdiff_t)mEnclosingBlockOffset)); reinterpret_cast<const BaseBlock*>(my_addr - (ptrdiff_t)mEnclosingBlockOffset));
} }
private: private:
friend class BaseBlock; friend class BaseBlock;
bool mIsProvided; bool mIsProvided;
S16 mEnclosingBlockOffset; U16 mEnclosingBlockOffset;
}; };
// various callbacks and constraints associated with an individual param // various callbacks and constraints associated with an individual param
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment