fix(pointer cache): cache version should be sensitive to field count (#1512)
This commit is contained in:
parent
1eae251012
commit
717468087c
@ -22,7 +22,10 @@ namespace big
|
|||||||
{
|
{
|
||||||
static_assert(batch_hash > 0);
|
static_assert(batch_hash > 0);
|
||||||
|
|
||||||
cache_file.set_cache_version(batch_hash);
|
constexpr size_t field_count = (offset_of_cache_end_field - offset_of_cache_begin_field) / sizeof(void*);
|
||||||
|
constexpr auto cache_version = batch_hash + field_count;
|
||||||
|
|
||||||
|
cache_file.set_cache_version(cache_version);
|
||||||
|
|
||||||
const uintptr_t pointer_to_cacheable_data_start = reinterpret_cast<uintptr_t>(this) + offset_of_cache_begin_field;
|
const uintptr_t pointer_to_cacheable_data_start = reinterpret_cast<uintptr_t>(this) + offset_of_cache_begin_field;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user