Skip to content

Commit 4202454

Browse files
committed
Fix VariantAllocator assert
1 parent 59753a0 commit 4202454

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/variant_allocator.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ class VariantAllocator {
3232
PackedStringArray string_array;
3333
};
3434

35-
static_assert(sizeof(BucketSmall) == 8, "BucketSmall should have a size of 8 bytes");
36-
static_assert(sizeof(BucketLarge) == 16, "BucketLarge should have a size of 16 bytes");
35+
static_assert(sizeof(BucketSmall) <= 8, "BucketSmall should have at most a size of 8 bytes");
36+
static_assert(sizeof(BucketLarge) <= 16, "BucketLarge should have at most a size of 16 bytes");
37+
static_assert(sizeof(BucketSmall) < sizeof(BucketLarge), "BucketLarge should be larger than BucketSmall");
3738

3839
inline static PagedAllocator<BucketSmall, true> bucket_small;
3940
inline static PagedAllocator<BucketLarge, true> bucket_large;

0 commit comments

Comments
 (0)