newer standards prefer nullptr over NULL - this is most of them but there are others too

This commit is contained in:
DarthArgus
2016-02-11 15:16:14 -06:00
parent a7f2d0ea6a
commit 3e4cc36e7e
937 changed files with 14983 additions and 14983 deletions
@@ -32,10 +32,10 @@ MxCifQuadTree::MxCifQuadTree(float minX, float minY, float maxX, float maxY, int
m_centerX((m_maxX - m_minX) / 2.0f + m_minX),
m_centerY((m_maxY - m_minY) / 2.0f + m_minY),
m_maxDepth(maxDepth),
m_urTree(NULL),
m_ulTree(NULL),
m_llTree(NULL),
m_lrTree(NULL),
m_urTree(nullptr),
m_ulTree(nullptr),
m_llTree(nullptr),
m_lrTree(nullptr),
m_xAxisTree(minX, maxX, maxDepth),
m_yAxisTree(minY, maxY, maxDepth)
{
@@ -49,13 +49,13 @@ MxCifQuadTree::MxCifQuadTree(float minX, float minY, float maxX, float maxY, int
MxCifQuadTree::~MxCifQuadTree()
{
delete m_urTree;
m_urTree = NULL;
m_urTree = nullptr;
delete m_ulTree;
m_ulTree = NULL;
m_ulTree = nullptr;
delete m_llTree;
m_llTree = NULL;
m_llTree = nullptr;
delete m_lrTree;
m_lrTree = NULL;
m_lrTree = nullptr;
} // MxCifQuadTree::~MxCifQuadTree
//------------------------------------------------------------------------------
@@ -99,7 +99,7 @@ bool MxCifQuadTree::addObject(const MxCifQuadTreeBounds & object)
// try putting the object in a child node
if (m_maxDepth > 1)
{
if (m_urTree == NULL)
if (m_urTree == nullptr)
{
if (!split())
return false;
@@ -158,7 +158,7 @@ bool MxCifQuadTree::removeObject(const MxCifQuadTreeBounds & object)
{
if (m_maxDepth > 1)
{
if (m_urTree != NULL)
if (m_urTree != nullptr)
{
// check if the object is in a sub-node
if (m_urTree->removeObject(object) ||
@@ -212,7 +212,7 @@ void MxCifQuadTree::getObjectsAt(float x, float y,
y >= m_minY)
{
// if we have sub-trees, pass the point to the tree that contains it
if (m_urTree != NULL)
if (m_urTree != nullptr)
{
if (x >= m_centerX && y >= m_centerY)
m_urTree->getObjectsAt(x, y, objects);
@@ -239,7 +239,7 @@ void MxCifQuadTree::getObjectsAt(float x, float y,
void MxCifQuadTree::getAllObjects(std::vector<const MxCifQuadTreeBounds *> & objects) const
{
// if we have sub-trees, pass the point to the tree that contains it
if (m_urTree != NULL)
if (m_urTree != nullptr)
{
m_urTree->getAllObjects(objects);
m_ulTree->getAllObjects(objects);
@@ -265,8 +265,8 @@ MxCifQuadTree::MxCifBinTree::MxCifBinTree(float min, float max, int maxDepth) :
m_max(max),
m_center((max - min) / 2.0f + min),
m_maxDepth(maxDepth),
m_left(NULL),
m_right(NULL),
m_left(nullptr),
m_right(nullptr),
m_objects()
{
} // MxCifBinTree::MxCifBinTree
@@ -277,9 +277,9 @@ MxCifQuadTree::MxCifBinTree::MxCifBinTree(float min, float max, int maxDepth) :
MxCifQuadTree::MxCifBinTree::~MxCifBinTree()
{
delete m_left;
m_left = NULL;
m_left = nullptr;
delete m_right;
m_right = NULL;
m_right = nullptr;
m_objects.clear();
} // MxCifBinTree::~MxCifBinTree
@@ -315,7 +315,7 @@ bool MxCifQuadTree::MxCifBinTree::addObject(const MxCifQuadTreeBounds & object)
// try putting the object in a child node
if (m_maxDepth > 1)
{
if (m_left == NULL)
if (m_left == nullptr)
{
if (!split())
return false;
@@ -348,7 +348,7 @@ bool MxCifQuadTree::MxCifBinTree::removeObject(const MxCifQuadTreeBounds & objec
{
if (m_maxDepth > 1)
{
if (m_left != NULL)
if (m_left != nullptr)
{
// check if the object is in a sub-node
if (m_left->removeObject(object) ||
@@ -379,7 +379,7 @@ void MxCifQuadTree::MxCifBinTree::getAllObjects(
std::vector<const MxCifQuadTreeBounds *> & objects) const
{
// if we have sub-trees, pass the point to the tree that contains it
if (m_left != NULL)
if (m_left != nullptr)
{
m_right->getAllObjects(objects);
m_left->getAllObjects(objects);
@@ -435,7 +435,7 @@ void MxCifQuadTree::MxCifXBinTree::getObjectsAt(float x, float y,
x >= m_min)
{
// if we have sub-trees, pass the point to the tree that contains it
if (m_left != NULL)
if (m_left != nullptr)
{
if (x >= m_center)
m_right->getObjectsAt(x, y, objects);
@@ -498,7 +498,7 @@ void MxCifQuadTree::MxCifYBinTree::getObjectsAt(float x, float y,
y >= m_min)
{
// if we have sub-trees, pass the point to the tree that contains it
if (m_left != NULL)
if (m_left != nullptr)
{
if (y >= m_center)
m_right->getObjectsAt(x, y, objects);
@@ -19,7 +19,7 @@
class MxCifQuadTreeBounds
{
public:
MxCifQuadTreeBounds(float minX, float minY, float maxX, float maxY, void * data = NULL);
MxCifQuadTreeBounds(float minX, float minY, float maxX, float maxY, void * data = nullptr);
virtual ~MxCifQuadTreeBounds(){};
const float getMinX(void) const;
@@ -87,7 +87,7 @@ inline void * MxCifQuadTreeBounds::getData(void) const
class MxCifQuadTreeCircleBounds : public MxCifQuadTreeBounds
{
public:
MxCifQuadTreeCircleBounds(float centerX, float centerY, float radius, void * data = NULL);
MxCifQuadTreeCircleBounds(float centerX, float centerY, float radius, void * data = nullptr);
float getCenterX() const;
float getCenterY() const;
@@ -63,7 +63,7 @@ void Plane::set(const Vector &point0, const Vector &point1, const Vector &point2
* Find the intersection between a line segment and the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
@@ -85,7 +85,7 @@ bool Plane::findIntersection(const Vector &point0, const Vector &point1) const
* Find the intersection between a line segment and the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
@@ -120,7 +120,7 @@ bool Plane::findIntersection(const Vector &point0, const Vector &point1, Vector
* Find the intersection between a line segment and the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
@@ -159,7 +159,7 @@ bool Plane::findIntersection(const Vector &point0, const Vector &point1, Vector
* Find the intersection between a line segment and the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
@@ -198,7 +198,7 @@ bool Plane::findIntersection(const Vector &point0, const Vector &point1, float &
* back side of the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
@@ -224,12 +224,12 @@ bool Plane::findDirectedIntersection(const Vector &point0, const Vector &point1)
* back side of the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
* @param point1 [IN] End of the line segment
* @param intersection [OUT] Intersection of the point and the plane (may be NULL)
* @param intersection [OUT] Intersection of the point and the plane (may be nullptr)
* @param t [OUT] parameterized t from 0..1
* @return True if the line segment intersects the plane from front-to-rear, otherwise false.
*/
@@ -265,12 +265,12 @@ bool Plane::findDirectedIntersection(const Vector &point0, const Vector &point1,
* back side of the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
* @param point1 [IN] End of the line segment
* @param intersection [OUT] Intersection of the point and the plane (may be NULL)
* @param intersection [OUT] Intersection of the point and the plane (may be nullptr)
* @param t [OUT] parameterized t from 0..1
* @return True if the line segment intersects the plane from front-to-rear, otherwise false.
*/
@@ -308,12 +308,12 @@ bool Plane::findDirectedIntersection(const Vector &point0, const Vector &point1,
* back side of the plane.
*
* If the line segment does intersect the plane, and the intersection
* pointer is non-NULL, then intersection will be set to the point on
* pointer is non-nullptr, then intersection will be set to the point on
* the line segment that crosses the plane.
*
* @param point0 [IN] Start of the line segment
* @param point1 [IN] End of the line segment
* @param intersection [OUT] Intersection of the point and the plane (may be NULL)
* @param intersection [OUT] Intersection of the point and the plane (may be nullptr)
* @param t [OUT] parameterized t from 0..1
* @return True if the line segment intersects the plane from front-to-rear, otherwise false.
*/
@@ -138,7 +138,7 @@ void Quaternion::getTransform(Transform *transform) const
void Quaternion::getTransformPreserveTranslation(Transform *transform) const
{
DEBUG_FATAL(!transform, ("null transform arg"));
DEBUG_FATAL(!transform, ("nullptr transform arg"));
if ((w + s_quatEqualityEpsilon) < 1.f)
{
@@ -71,7 +71,7 @@ VectorPointerPool<ValueType>::~VectorPointerPool()
}
delete v;
v = NULL;
v = nullptr;
}
}
@@ -209,7 +209,7 @@ public:
node->move(this);
else
{
WARNING_STRICT_FATAL(true, ("SphereTree::move was invoked for an object, but the real sphere tree node it refers to is null."));
WARNING_STRICT_FATAL(true, ("SphereTree::move was invoked for an object, but the real sphere tree node it refers to is nullptr."));
}
};
@@ -292,7 +292,7 @@ inline SpatialSubdivisionHandle * SphereTreeNode<ObjectType, ExtentAccessor>::ad
if(!isValidSphere(sphere))
{
WARNING_STRICT_FATAL(true, ("SphereTreeNode::addObject - sphere for the object being added is invalid"));
return NULL;
return nullptr;
}
SphereTreeNode * candidateNode = 0;
@@ -493,7 +493,7 @@ void Transform::reorthonormalize(void)
/**
* Send this transform to the DebugPrint system.
*
* The header parameter may be NULL.
* The header parameter may be nullptr.
*
* @param header Header for the transform
*/
@@ -524,8 +524,8 @@ void Transform::debugPrint(const char *header) const
void Transform::rotate_l2p(const Vector *source, Vector *result, int count) const
{
DEBUG_FATAL(!source, ("source array is NULL"));
DEBUG_FATAL(!result, ("result array is NULL"));
DEBUG_FATAL(!source, ("source array is nullptr"));
DEBUG_FATAL(!result, ("result array is nullptr"));
DEBUG_FATAL(source == result, ("source and result array can not be the same"));
NOT_NULL(source);
@@ -559,8 +559,8 @@ void Transform::rotate_l2p(const Vector *source, Vector *result, int count) cons
void Transform::rotateTranslate_l2p(const Vector *source, Vector *result, int count) const
{
DEBUG_FATAL(!source, ("source array is NULL"));
DEBUG_FATAL(!result, ("result array is NULL"));
DEBUG_FATAL(!source, ("source array is nullptr"));
DEBUG_FATAL(!result, ("result array is nullptr"));
NOT_NULL(source);
NOT_NULL(result);
@@ -594,8 +594,8 @@ void Transform::rotateTranslate_l2p(const Vector *source, Vector *result, int co
void Transform::rotate_p2l(const Vector *source, Vector *result, int count) const
{
DEBUG_FATAL(!source, ("source array is NULL"));
DEBUG_FATAL(!result, ("result array is NULL"));
DEBUG_FATAL(!source, ("source array is nullptr"));
DEBUG_FATAL(!result, ("result array is nullptr"));
NOT_NULL(source);
NOT_NULL(result);
@@ -629,8 +629,8 @@ void Transform::rotate_p2l(const Vector *source, Vector *result, int count) cons
void Transform::rotateTranslate_p2l(const Vector *source, Vector *result, int count) const
{
DEBUG_FATAL(!source, ("source array is NULL"));
DEBUG_FATAL(!result, ("result array is NULL"));
DEBUG_FATAL(!source, ("source array is nullptr"));
DEBUG_FATAL(!result, ("result array is nullptr"));
NOT_NULL(source);
NOT_NULL(result);
@@ -115,7 +115,7 @@ bool Vector::isNormalized(void) const
const Vector Vector::findClosestPointOnLine(const Vector &line0, const Vector &line1, real *t) const
{
DEBUG_FATAL(!t, ("t arg is null"));
DEBUG_FATAL(!t, ("t arg is nullptr"));
NOT_NULL(t);
@@ -189,7 +189,7 @@ real Vector::distanceToLineSegment(const Vector &line0, const Vector &line1) con
/**
* Send this vector to the DebugPrint system.
*
* The header parameter may be NULL.
* The header parameter may be nullptr.
*
* @param header Header for the vector
*/
@@ -10,7 +10,7 @@
#include "sharedMath/Transform.h"
static DebugShapeRenderer::DebugShapeRendererFactory * gs_factory = NULL;
static DebugShapeRenderer::DebugShapeRendererFactory * gs_factory = nullptr;
// ----------------------------------------------------------------------
@@ -145,8 +145,8 @@ void DebugShapeRenderer::setFactory ( DebugShapeRenderer::DebugShapeRendererFact
DebugShapeRenderer * DebugShapeRenderer::create ( Object const * object )
{
if(gs_factory == NULL)
return NULL;
if(gs_factory == nullptr)
return nullptr;
return gs_factory(object);
}