diff options
author | Jozef Behran <jozuejozef@gmail.com> | 2019-08-13 14:26:37 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-08-13 14:44:32 +0200 |
commit | 833e60d8d229a082e9841dc89494e6bda9cd5020 (patch) | |
tree | 326be19c887b5ca9481868eb92d38d73e83686b7 /src/unittest/test.cpp | |
parent | 2f879e8bbd8329e4c796dc1f7eeea9bdc3be2b3d (diff) | |
download | minetest-833e60d8d229a082e9841dc89494e6bda9cd5020.tar.gz minetest-833e60d8d229a082e9841dc89494e6bda9cd5020.tar.bz2 minetest-833e60d8d229a082e9841dc89494e6bda9cd5020.zip |
Fix compare between pointer and 0 in unittests
Pointers shall be set to nullptr, not 0, according to the
coding standards. By implication they shall be compared with
nullptr, not 0, too. Fix this code to match that.
Diffstat (limited to 'src/unittest/test.cpp')
-rw-r--r-- | src/unittest/test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 3ac8ffb19..a783ccd32 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -650,12 +650,12 @@ struct TestMapSector: public TestBase // Create one with no heightmaps ServerMapSector sector(&parent, v2s16(1,1)); - UASSERT(sector.getBlockNoCreateNoEx(0) == 0); - UASSERT(sector.getBlockNoCreateNoEx(1) == 0); + UASSERT(sector.getBlockNoCreateNoEx(0) == nullptr); + UASSERT(sector.getBlockNoCreateNoEx(1) == nullptr); MapBlock * bref = sector.createBlankBlock(-2); - UASSERT(sector.getBlockNoCreateNoEx(0) == 0); + UASSERT(sector.getBlockNoCreateNoEx(0) == nullptr); UASSERT(sector.getBlockNoCreateNoEx(-2) == bref); //TODO: Check for AlreadyExistsException |