diff options
Diffstat (limited to '')
-rw-r--r-- | src/ChunkData.cpp | 10 | ||||
-rw-r--r-- | tests/ChunkData/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/TestGlobals.h | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp index 162803292..79029f0cf 100644 --- a/src/ChunkData.cpp +++ b/src/ChunkData.cpp @@ -1,5 +1,9 @@ +#ifdef TEST_GLOBALS +#include "TestGlobals.h" +#else #include "Globals.h" +#endif #include "ChunkData.h" cChunkData::cChunkData() @@ -39,7 +43,7 @@ cChunkData::~cChunkData() other.IsOwner = false; } - cChunkData::cChunkData& operator=(const cChunkData& other) + cChunkData& cChunkData::operator=(const cChunkData& other) { if (&other != this) { @@ -71,7 +75,7 @@ cChunkData::~cChunkData() } } - cChunkData::cChunkData& operator=(cChunkData&& other) + cChunkData& cChunkData::operator=(cChunkData&& other) { if (&other != this) { @@ -230,7 +234,7 @@ NIBBLETYPE cChunkData::GetSkyLight(int a_RelX, int a_RelY, int a_RelZ) const return 0; } -cChunkData cChunkData::cChunkData::Copy() const +cChunkData cChunkData::Copy() const { cChunkData copy; for (size_t i = 0; i < CHUNK_SECTION_COUNT; i++) diff --git a/tests/ChunkData/CMakeLists.txt b/tests/ChunkData/CMakeLists.txt index 3f6653bb5..a2bd9fd22 100644 --- a/tests/ChunkData/CMakeLists.txt +++ b/tests/ChunkData/CMakeLists.txt @@ -4,6 +4,7 @@ enable_testing() include_directories(${CMAKE_SOURCE_DIR}/src/) +add_definitions(-DTEST_GLOBALS=1) add_library(ChunkBuffer ${CMAKE_SOURCE_DIR}/src/ChunkData.cpp) diff --git a/tests/TestGlobals.h b/tests/TestGlobals.h index bb25bd20a..ea43de733 100644 --- a/tests/TestGlobals.h +++ b/tests/TestGlobals.h @@ -126,9 +126,9 @@ class cAssertFailure #define UNUSED(X) (void)(X) // Logging functions -void LOGERROR(const char* a_Format, ...) FORMATSTRING(1,2); +void inline LOGERROR(const char* a_Format, ...) FORMATSTRING(1,2); -void LOGERROR(const char* a_Format, ...) +void inline LOGERROR(const char* a_Format, ...) { va_list argList; va_start(argList, a_Format); |