[Bf-blender-cvs] [7b082989279] master: BLI: use no_unique_address in BitVector
Jacques Lucke
noreply at git.blender.org
Tue Nov 29 16:36:07 CET 2022
Commit: 7b08298927946bab24bf2e0417f8955d5934ef92
Author: Jacques Lucke
Date: Tue Nov 29 16:34:57 2022 +0100
Branches: master
https://developer.blender.org/rB7b08298927946bab24bf2e0417f8955d5934ef92
BLI: use no_unique_address in BitVector
This allows the vector to be smaller when it has no inline buffer (24 ->32 byte).
===================================================================
M source/blender/blenlib/BLI_bit_vector.hh
===================================================================
diff --git a/source/blender/blenlib/BLI_bit_vector.hh b/source/blender/blenlib/BLI_bit_vector.hh
index f843a7e3ab3..e5d602b5e04 100644
--- a/source/blender/blenlib/BLI_bit_vector.hh
+++ b/source/blender/blenlib/BLI_bit_vector.hh
@@ -200,10 +200,10 @@ class BitVector {
int64_t capacity_in_bits_;
/** Used for allocations when the inline buffer is too small. */
- Allocator allocator_;
+ BLI_NO_UNIQUE_ADDRESS Allocator allocator_;
/** Contains the bits as long as the vector is small enough. */
- TypedBuffer<uint8_t, BytesInInlineBuffer> inline_buffer_;
+ BLI_NO_UNIQUE_ADDRESS TypedBuffer<uint8_t, BytesInInlineBuffer> inline_buffer_;
public:
BitVector(Allocator allocator = {}) noexcept : allocator_(allocator)
More information about the Bf-blender-cvs
mailing list