Core/Server: Use nullptr instead of 0 where pointers are expected

This commit is contained in:
DDuarte committed 2014-08-09 21:32:26 +01:00
1 parent a394205eca
commit df3b08d140
39 files changed
+78 -78

No files matched your search

+4 -4
View File
@@ -108,7 +108,7 @@ namespace VMAP
iFlags = new uint8[width*height];
}
WmoLiquid::WmoLiquid(const WmoLiquid &other): iHeight(0), iFlags(0)
WmoLiquid::WmoLiquid(const WmoLiquid &other): iHeight(nullptr), iFlags(nullptr)
{
*this = other; // use assignment operator...
}
@@ -135,14 +135,14 @@ namespace VMAP
memcpy(iHeight, other.iHeight, (iTilesX+1)*(iTilesY+1)*sizeof(float));
}
else
iHeight = 0;
iHeight = nullptr;
if (other.iFlags)
{
iFlags = new uint8[iTilesX * iTilesY];
memcpy(iFlags, other.iFlags, iTilesX * iTilesY);
}
else
iFlags = 0;
iFlags = nullptr;
return *this;
}
@@ -254,7 +254,7 @@ namespace VMAP
GroupModel::GroupModel(const GroupModel &other):
iBound(other.iBound), iMogpFlags(other.iMogpFlags), iGroupWMOID(other.iGroupWMOID),
vertices(other.vertices), triangles(other.triangles), meshTree(other.meshTree), iLiquid(0)
vertices(other.vertices), triangles(other.triangles), meshTree(other.meshTree), iLiquid(nullptr)
{
if (other.iLiquid)
iLiquid = new WmoLiquid(*other.iLiquid);