Skip to content

Commit f6c5765

Browse files
committedJan 8, 2025
Update TScratchAllocator.h
1 parent 7d49eb5 commit f6c5765

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎include/cppcore/Memory/TScratchAllocator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,20 @@ class TScratchAllocator {
8080
CPPCORE_NONE_COPYING(TScratchAllocator)
8181

8282
private:
83-
T *mBlock;
83+
T *mBlock = nullptr;
8484
size_t mSize;
8585
size_t mIndex;
8686
};
8787

8888
template<class T>
8989
inline TScratchAllocator<T>::TScratchAllocator() :
90-
mBlock(nullptr), mSize(0u), mIndex(0u) {
90+
mSize(0u), mIndex(0u) {
9191
// empty
9292
}
9393

9494
template<class T>
9595
inline TScratchAllocator<T>::TScratchAllocator(size_t numItems) :
96-
mBlock(nullptr), mSize(numItems), mIndex(0u) {
96+
mSize(numItems), mIndex(0u) {
9797
reserve(numItems);
9898
}
9999

0 commit comments

Comments
 (0)