Respect kSetVersion in default set cache key.
This commit is contained in:
parent
2f21e92bbe
commit
c5b32c53ef
1 changed files with 3 additions and 6 deletions
|
|
@ -124,12 +124,9 @@ uint32 ComputeVersion(int id) {
|
||||||
static_assert(kCacheVersion > 0 && kCacheVersion < (1 << 16));
|
static_assert(kCacheVersion > 0 && kCacheVersion < (1 << 16));
|
||||||
static_assert(kSetVersion > 0 && kSetVersion < (1 << 8));
|
static_assert(kSetVersion > 0 && kSetVersion < (1 << 8));
|
||||||
|
|
||||||
auto result = uint32(kCacheVersion);
|
return uint32(kCacheVersion)
|
||||||
if (!id) {
|
| (uint32(kSetVersion) << 16)
|
||||||
return result;
|
| (uint32(id) << 24);
|
||||||
}
|
|
||||||
result |= (uint32(id) << 24) | (uint32(kSetVersion) << 16);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ReadCurrentSetId() {
|
int ReadCurrentSetId() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue