diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/ArrayWithLength.h | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (diff) | |
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.World/ArrayWithLength.h')
| -rw-r--r-- | Minecraft.World/ArrayWithLength.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Minecraft.World/ArrayWithLength.h b/Minecraft.World/ArrayWithLength.h index ab491aa8..e22724c6 100644 --- a/Minecraft.World/ArrayWithLength.h +++ b/Minecraft.World/ArrayWithLength.h @@ -10,7 +10,7 @@ template <class T> class arrayWithLength public: T *data; unsigned int length; - arrayWithLength() { data = nullptr; length = 0; } + arrayWithLength() { data = NULL; length = 0; } arrayWithLength(unsigned int elements, bool bClearArray=true) { assert(elements!=0); data = new T[elements]; if(bClearArray){ memset( data,0,sizeof(T)*elements); } this->length = elements; } // 4J Stu Added this ctor so I static init arrays in the Item derivation tree @@ -24,7 +24,7 @@ public: T *temp = new T[elements]; memset( temp,0,sizeof(T)*elements); - if( data != nullptr ) + if( data != NULL ) { std::copy( data, data+length, temp ); @@ -45,7 +45,7 @@ template <class T> class array2DWithLength public: _parrayWithLength *data; unsigned int length; - array2DWithLength() { data = nullptr; length = 0; } + array2DWithLength() { data = NULL; length = 0; } array2DWithLength(unsigned int dimA, unsigned int dimB) { data = new _parrayWithLength[dimA]; |
