mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(clang-tidy) : modernize-use-nullptr
This commit is contained in:
@@ -108,7 +108,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::createPipeSurface()
|
||||
{
|
||||
if (m_radius == 0.0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
updateFilteredPipeCenterCoords();
|
||||
@@ -212,9 +212,9 @@ void RivPipeGeometryGenerator::computeCircle(double radius, size_t tesselationCo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateLine(const cvf::Vec3dArray* coords)
|
||||
{
|
||||
CVF_ASSERT(coords != NULL);
|
||||
CVF_ASSERT(coords != nullptr);
|
||||
|
||||
if (coords->size() < 2 ) return NULL;
|
||||
if (coords->size() < 2 ) return nullptr;
|
||||
|
||||
size_t duplicateVertexCount = 2 * (coords->size() - 1);
|
||||
|
||||
@@ -259,9 +259,9 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateLine(const cvf::Vec
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords)
|
||||
{
|
||||
CVF_ASSERT(cylinderCenterCoords != NULL);
|
||||
CVF_ASSERT(cylinderCenterCoords != nullptr);
|
||||
|
||||
if (cylinderCenterCoords->size() < 2) return NULL;
|
||||
if (cylinderCenterCoords->size() < 2) return nullptr;
|
||||
|
||||
std::vector<cvf::Vec3f> crossSectionVertices;
|
||||
std::vector<cvf::Vec3f> cylinderSegmentNormals;
|
||||
@@ -300,7 +300,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(do
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= cylinderCenterCoords->size()-1) return NULL; // The pipe coordinates is all the same point
|
||||
if (i >= cylinderCenterCoords->size()-1) return nullptr; // The pipe coordinates is all the same point
|
||||
|
||||
// Loop along the cylinder center coords and calculate the cross section vertexes in each center vertex
|
||||
|
||||
@@ -346,7 +346,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(do
|
||||
|
||||
size_t crossSectionCount = crossSectionVertices.size() / crossSectionNodeCount;
|
||||
|
||||
if (crossSectionCount < 2) return NULL;
|
||||
if (crossSectionCount < 2) return nullptr;
|
||||
|
||||
CVF_ASSERT(crossSectionVertices.size() - crossSectionNodeCount == cylinderSegmentNormals.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user