mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
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.
This commit is contained in:
parent
2f879e8bbd
commit
833e60d8d2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user