diff options
author | Richard Linden <none@none> | 2012-05-21 18:26:18 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-05-21 18:26:18 -0700 |
commit | f89d94434c6e9d96ad71586d55c2b32d933a1e05 (patch) | |
tree | 433541187c409af940a9f8437671ca67dbe46b88 /indra/llui | |
parent | 723f596bf6f2fac2c24360790024ec3a4e778793 (diff) |
made param blocks smaller by making param overhead 3 bytes instead of 4
Optional<bool> should now be 4 bytes smaller.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/tests/llurlentry_stub.cpp | 4 | ||||
-rw-r--r-- | indra/llui/tests/llurlmatch_test.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 9cb6a89eee..61e30d89d0 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -110,7 +110,9 @@ namespace LLInitParam { const U8* my_addr = reinterpret_cast<const U8*>(this); const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block); - mEnclosingBlockOffset = (U16)(my_addr - block_addr); + U32 enclosing_block_offset = 0x7FFFffff & (U32)(my_addr - block_addr); + mEnclosingBlockOffsetLow = enclosing_block_offset & 0x0000ffff; + mEnclosingBlockOffsetHigh = (enclosing_block_offset & 0x007f0000) >> 16; } void BlockDescriptor::addParam(const ParamDescriptorPtr in_param, const char* char_name){} diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp index 36402f5b27..97fe5b2eea 100644 --- a/indra/llui/tests/llurlmatch_test.cpp +++ b/indra/llui/tests/llurlmatch_test.cpp @@ -88,7 +88,9 @@ namespace LLInitParam { const U8* my_addr = reinterpret_cast<const U8*>(this); const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block); - mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr)); + U32 enclosing_block_offset = 0x7FFFffff & (U32)(my_addr - block_addr); + mEnclosingBlockOffsetLow = enclosing_block_offset & 0x0000ffff; + mEnclosingBlockOffsetHigh = (enclosing_block_offset & 0x007f0000) >> 16; } bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name){ return true; } |