Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern/view_map')
-rw-r--r--source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h5
-rw-r--r--source/blender/freestyle/intern/view_map/AutoPtrHelper.h5
-rw-r--r--source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h5
-rw-r--r--source/blender/freestyle/intern/view_map/BoxGrid.h5
-rw-r--r--source/blender/freestyle/intern/view_map/CulledOccluderSource.h5
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.h5
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.h5
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.h5
-rw-r--r--source/blender/freestyle/intern/view_map/GridDensityProvider.h5
-rw-r--r--source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp15
-rw-r--r--source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h5
-rw-r--r--source/blender/freestyle/intern/view_map/Interface0D.h5
-rw-r--r--source/blender/freestyle/intern/view_map/Interface1D.h5
-rw-r--r--source/blender/freestyle/intern/view_map/OccluderSource.cpp9
-rw-r--r--source/blender/freestyle/intern/view_map/OccluderSource.h5
-rw-r--r--source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h5
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.h5
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h5
-rw-r--r--source/blender/freestyle/intern/view_map/SphericalGrid.h5
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp68
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.cpp18
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h11
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp23
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIterators.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapTesselator.h5
32 files changed, 90 insertions, 178 deletions
diff --git a/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h b/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
index 97aae3d653c..c2d843742df 100644
--- a/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_ARBITRARY_GRID_DENSITY_PROVIDER_H__
-#define __FREESTYLE_ARBITRARY_GRID_DENSITY_PROVIDER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -66,5 +65,3 @@ class ArbitraryGridDensityProviderFactory : public GridDensityProviderFactory {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_ARBITRARY_GRID_DENSITY_PROVIDER_H__
diff --git a/source/blender/freestyle/intern/view_map/AutoPtrHelper.h b/source/blender/freestyle/intern/view_map/AutoPtrHelper.h
index fb2a9d73d13..94fd80bc0fb 100644
--- a/source/blender/freestyle/intern/view_map/AutoPtrHelper.h
+++ b/source/blender/freestyle/intern/view_map/AutoPtrHelper.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_AUTOPTR_HELPER_H__
-#define __FREESTYLE_AUTOPTR_HELPER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -47,5 +46,3 @@ template<typename T> class AutoPtr : public std::unique_ptr<T> {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_AUTOPTR_HELPER_H__
diff --git a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
index f530cf35569..5336cc1ff97 100644
--- a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_AVERAGE_AREA_GRID_DENSITY_PROVIDER_H__
-#define __FREESTYLE_AVERAGE_AREA_GRID_DENSITY_PROVIDER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -63,5 +62,3 @@ class AverageAreaGridDensityProviderFactory : public GridDensityProviderFactory
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_AVERAGE_AREA_GRID_DENSITY_PROVIDER_H__
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h
index 35b5e4d6b55..581ee0a2340 100644
--- a/source/blender/freestyle/intern/view_map/BoxGrid.h
+++ b/source/blender/freestyle/intern/view_map/BoxGrid.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_BOX_GRID_H__
-#define __FREESTYLE_BOX_GRID_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -422,5 +421,3 @@ inline bool BoxGrid::insertOccluder(OccluderSource &source, OccluderData *&occlu
}
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_BOX_GRID_H__
diff --git a/source/blender/freestyle/intern/view_map/CulledOccluderSource.h b/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
index 3457fb6ca10..2bb77bad0f7 100644
--- a/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
+++ b/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_CULLED_OCCLUDER_SOURCE_H__
-#define __FREESTYLE_CULLED_OCCLUDER_SOURCE_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -57,5 +56,3 @@ class CulledOccluderSource : public OccluderSource {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_CULLED_OCCLUDER_SOURCE_H__
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
index 2bcf2d3bee8..c4115ee00c4 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_FEDGE_X_DETECTOR_H__
-#define __FREESTYLE_FEDGE_X_DETECTOR_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -246,5 +245,3 @@ class FEdgeXDetector {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_FEDGE_X_DETECTOR_H__
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h
index 7149c1909fd..0364069b631 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.h
+++ b/source/blender/freestyle/intern/view_map/Functions0D.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_FUNCTIONS_0D_H__
-#define __FREESTYLE_FUNCTIONS_0D_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -509,5 +508,3 @@ ViewShape *getOccludeeF0D(Interface0DIterator &it);
} // end of namespace Functions0D
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_FUNCTIONS_0D_H__
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h
index 20aa9f2a27f..9cf5527ee19 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.h
+++ b/source/blender/freestyle/intern/view_map/Functions1D.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_FUNCTIONS_1D_H__
-#define __FREESTYLE_FUNCTIONS_1D_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -638,5 +637,3 @@ void getShapeF1D(Interface1D &inter, set<ViewShape *> &oShapes);
} // end of namespace Functions1D
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_FUNCTIONS_1D_H__
diff --git a/source/blender/freestyle/intern/view_map/GridDensityProvider.h b/source/blender/freestyle/intern/view_map/GridDensityProvider.h
index 290d5b0cfba..e663f14d368 100644
--- a/source/blender/freestyle/intern/view_map/GridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/GridDensityProvider.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_GRID_DENSITY_PROVIDER_H__
-#define __FREESTYLE_GRID_DENSITY_PROVIDER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -167,5 +166,3 @@ class GridDensityProviderFactory {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_GRID_DENSITY_PROVIDER_H__
diff --git a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
index 55bc02b8358..26a40ee587c 100644
--- a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
+++ b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
@@ -43,9 +43,8 @@ AutoPtr<GridDensityProvider> HeuristicGridDensityProviderFactory::newGridDensity
if (avg->cellSize() > p23->cellSize()) {
return (AutoPtr<GridDensityProvider>)p23;
}
- else {
- return (AutoPtr<GridDensityProvider>)avg;
- }
+
+ return (AutoPtr<GridDensityProvider>)avg;
}
AutoPtr<GridDensityProvider> HeuristicGridDensityProviderFactory::newGridDensityProvider(
@@ -58,9 +57,8 @@ AutoPtr<GridDensityProvider> HeuristicGridDensityProviderFactory::newGridDensity
if (avg->cellSize() > p23->cellSize()) {
return (AutoPtr<GridDensityProvider>)p23;
}
- else {
- return (AutoPtr<GridDensityProvider>)avg;
- }
+
+ return (AutoPtr<GridDensityProvider>)avg;
}
AutoPtr<GridDensityProvider> HeuristicGridDensityProviderFactory::newGridDensityProvider(
@@ -75,9 +73,8 @@ AutoPtr<GridDensityProvider> HeuristicGridDensityProviderFactory::newGridDensity
if (avg->cellSize() > p23->cellSize()) {
return (AutoPtr<GridDensityProvider>)p23;
}
- else {
- return (AutoPtr<GridDensityProvider>)avg;
- }
+
+ return (AutoPtr<GridDensityProvider>)avg;
}
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
index b32a284cb61..0ce62572092 100644
--- a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
+++ b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_HEURISTIC_GRID_DENSITY_PROVIDER_FACTORY_H__
-#define __FREESTYLE_HEURISTIC_GRID_DENSITY_PROVIDER_FACTORY_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -48,5 +47,3 @@ class HeuristicGridDensityProviderFactory : public GridDensityProviderFactory {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_HEURISTIC_GRID_DENSITY_PROVIDER_FACTORY_H__
diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h
index 724a98f047f..6b4682cc862 100644
--- a/source/blender/freestyle/intern/view_map/Interface0D.h
+++ b/source/blender/freestyle/intern/view_map/Interface0D.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_INTERFACE_0D_H__
-#define __FREESTYLE_INTERFACE_0D_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -341,5 +340,3 @@ class Interface0DIterator : public Iterator {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_INTERFACE_0D_H__
diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h
index ab489bff4c9..778deb20a60 100644
--- a/source/blender/freestyle/intern/view_map/Interface1D.h
+++ b/source/blender/freestyle/intern/view_map/Interface1D.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_INTERFACE_1D_H__
-#define __FREESTYLE_INTERFACE_1D_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -203,5 +202,3 @@ class Interface1D {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_INTERFACE_1D_H__
diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.cpp b/source/blender/freestyle/intern/view_map/OccluderSource.cpp
index 7132e0172ae..e75856edc35 100644
--- a/source/blender/freestyle/intern/view_map/OccluderSource.cpp
+++ b/source/blender/freestyle/intern/view_map/OccluderSource.cpp
@@ -77,11 +77,10 @@ bool OccluderSource::next()
valid = false;
return false;
}
- else {
- vector<WFace *> &wFaces = (*currentShape)->GetFaceList();
- currentFace = wFaces.begin();
- facesEnd = wFaces.end();
- }
+
+ vector<WFace *> &wFaces = (*currentShape)->GetFaceList();
+ currentFace = wFaces.begin();
+ facesEnd = wFaces.end();
}
buildCachedPolygon();
return true;
diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.h b/source/blender/freestyle/intern/view_map/OccluderSource.h
index 07df3b95347..befde3c1b1b 100644
--- a/source/blender/freestyle/intern/view_map/OccluderSource.h
+++ b/source/blender/freestyle/intern/view_map/OccluderSource.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_OCCLUDER_SOURCE_H__
-#define __FREESTYLE_OCCLUDER_SOURCE_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -70,5 +69,3 @@ class OccluderSource {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_OCCLUDER_SOURCE_H__
diff --git a/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h b/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
index 52d57e3030e..fec869e0665 100644
--- a/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__
-#define __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -64,5 +63,3 @@ class Pow23GridDensityProviderFactory : public GridDensityProviderFactory {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index 8503836e0ca..6463cd7eb3e 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_SILHOUETTE_H__
-#define __FREESTYLE_SILHOUETTE_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -1958,5 +1957,3 @@ class SShape {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_SILHOUETTE_H__
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
index 46d4389ea83..2624c70c988 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
@@ -124,7 +124,7 @@ void SilhouetteGeomEngine::setFrustum(real iZNear, real iZFar)
void SilhouetteGeomEngine::retrieveViewport(int viewport[4])
{
- memcpy(viewport, _viewport, 4 * sizeof(int));
+ memcpy(viewport, _viewport, sizeof(int[4]));
}
void SilhouetteGeomEngine::ProjectSilhouette(vector<SVertex *> &ioVertices)
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
index 79d863e81e7..124ef35e5b9 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_SILHOUETTE_GEOM_ENGINE_H__
-#define __FREESTYLE_SILHOUETTE_GEOM_ENGINE_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -135,5 +134,3 @@ class SilhouetteGeomEngine {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_SILHOUETTE_GEOM_ENGINE_H__
diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h
index e9074580fb9..0ef68d073ae 100644
--- a/source/blender/freestyle/intern/view_map/SphericalGrid.h
+++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_SPHERICAL_GRID_H__
-#define __FREESTYLE_SPHERICAL_GRID_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -434,5 +433,3 @@ inline bool SphericalGrid::insertOccluder(OccluderSource &source, OccluderData *
}
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_SPHERICAL_GRID_H__
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.h b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
index 537f07f44f4..65633fd85d4 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.h
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_STEERABLE_VIEW_MAP_H__
-#define __FREESTYLE_STEERABLE_VIEW_MAP_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -156,5 +155,3 @@ class SteerableViewMap {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_STEERABLE_VIEW_MAP_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index d024c360e3f..aecd37fa0de 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -344,9 +344,8 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
if (woeend == winner->getSmoothEdge()->woea()->twin()) {
return OWXFaceLayer(winner, true);
}
- else {
- return OWXFaceLayer(winner, false);
- }
+
+ return OWXFaceLayer(winner, false);
}
}
++f;
@@ -368,19 +367,17 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
if ((sameNatureLayers.empty()) || (sameNatureLayers.size() != 1)) {
return OWXFaceLayer(NULL, true);
}
- else {
- WXFaceLayer *winner = sameNatureLayers[0];
- // check face mark continuity
- if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
- return OWXFaceLayer(NULL, true);
- }
- if (woeend == winner->getSmoothEdge()->woea()->twin()) {
- return OWXFaceLayer(winner, true);
- }
- else {
- return OWXFaceLayer(winner, false);
- }
+
+ WXFaceLayer *winner = sameNatureLayers[0];
+ // check face mark continuity
+ if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
+ return OWXFaceLayer(NULL, true);
+ }
+ if (woeend == winner->getSmoothEdge()->woea()->twin()) {
+ return OWXFaceLayer(winner, true);
}
+
+ return OWXFaceLayer(winner, false);
}
return OWXFaceLayer(NULL, true);
}
@@ -429,9 +426,8 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
if (woebegin == winner->getSmoothEdge()->woeb()->twin()) {
return OWXFaceLayer(winner, true);
}
- else {
- return OWXFaceLayer(winner, false);
- }
+
+ return OWXFaceLayer(winner, false);
}
}
}
@@ -452,19 +448,17 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
if ((sameNatureLayers.empty()) || (sameNatureLayers.size() != 1)) {
return OWXFaceLayer(NULL, true);
}
- else {
- WXFaceLayer *winner = sameNatureLayers[0];
- // check face mark continuity
- if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
- return OWXFaceLayer(NULL, true);
- }
- if (woebegin == winner->getSmoothEdge()->woeb()->twin()) {
- return OWXFaceLayer(winner, true);
- }
- else {
- return OWXFaceLayer(winner, false);
- }
+
+ WXFaceLayer *winner = sameNatureLayers[0];
+ // check face mark continuity
+ if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
+ return OWXFaceLayer(NULL, true);
+ }
+ if (woebegin == winner->getSmoothEdge()->woeb()->twin()) {
+ return OWXFaceLayer(winner, true);
}
+
+ return OWXFaceLayer(winner, false);
}
return OWXFaceLayer(NULL, true);
}
@@ -631,11 +625,10 @@ OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge &iEdge)
// So the vertex order is OK.
return OWXEdge(wxe, true);
}
- else {
- // That means that the face necessarily lies on the edge left.
- // So the vertex order is OK.
- return OWXEdge(wxe, false);
- }
+
+ // That means that the face necessarily lies on the edge left.
+ // So the vertex order is OK.
+ return OWXEdge(wxe, false);
}
// we did not find:
return OWXEdge(NULL, true);
@@ -679,9 +672,8 @@ OWXEdge ViewEdgeXBuilder::FindPreviousWEdge(const OWXEdge &iEdge)
if (wxe->GetbVertex() == v) {
return OWXEdge(wxe, true);
}
- else {
- return OWXEdge(wxe, false);
- }
+
+ return OWXEdge(wxe, false);
}
// we did not find:
return OWXEdge(NULL, true);
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
index b1934d08376..f6f54a2d87d 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_EDGE_X_BUILDER_H__
-#define __FREESTYLE_VIEW_EDGE_X_BUILDER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -292,5 +291,3 @@ class ViewEdgeXBuilder {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_EDGE_X_BUILDER_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index 47c6c3a1f6a..fa2f95dac72 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -323,18 +323,16 @@ static bool ViewEdgeComp(ViewVertex::directedViewEdge &dve1, ViewVertex::directe
if (v2.y() < 0) {
return true;
}
- else {
- return (v1.x() > v2.x());
- }
+
+ return (v1.x() > v2.x());
}
- else {
- if (v2.y() > 0) {
- return false;
- }
- else {
- return (v1.x() < v2.x());
- }
+
+ if (v2.y() > 0) {
+ return false;
}
+
+ return (v1.x() < v2.x());
+
return false;
}
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index 83c45be8c61..e5e49f17ca5 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_MAP_H__
-#define __FREESTYLE_VIEW_MAP_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -1830,5 +1829,3 @@ inline real ViewEdge::curvature2d_as_angle(int iCombination) const
#endif
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_MAP_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
index 2ff46e353f3..5cb52b6a0f3 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_MAP_ADVANCED_ITERATORS_H__
-#define __FREESTYLE_VIEW_MAP_ADVANCED_ITERATORS_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -499,7 +498,7 @@ class edge_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTag_
// dereferencing
virtual reference operator*() const
{
- return (_ViewEdge);
+ return _ViewEdge;
}
virtual pointer operator->() const
@@ -627,7 +626,7 @@ class fedge_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTag
// dereferencing
virtual reference operator*() const
{
- return (_FEdge);
+ return _FEdge;
}
virtual pointer operator->() const
@@ -775,7 +774,7 @@ class vertex_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTa
// dereferencing
virtual reference operator*() const
{
- return (_SVertex);
+ return _SVertex;
}
virtual pointer operator->() const
@@ -816,5 +815,3 @@ class vertex_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTa
} // end of namespace ViewEdgeInternal
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_MAP_ADVANCED_ITERATORS_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index 8ac272e92b5..a0989c52e4e 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -504,10 +504,10 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
(*ve)->setaShape(0);
continue;
}
- else {
- ++qiMajority;
- qiMajority >>= 1;
- }
+
+ ++qiMajority;
+ qiMajority >>= 1;
+
#if LOGGING
if (_global.debug & G_DEBUG_FREESTYLE) {
cout << "\tqiMajority: " << qiMajority << endl;
@@ -702,10 +702,10 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
(*ve)->setaShape(0);
continue;
}
- else {
- ++qiMajority;
- qiMajority >>= 1;
- }
+
+ ++qiMajority;
+ qiMajority >>= 1;
+
#if LOGGING
if (_global.debug & G_DEBUG_FREESTYLE) {
cout << "\tqiMajority: " << qiMajority << endl;
@@ -873,10 +873,9 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
(*ve)->setaShape(0);
continue;
}
- else {
- ++qiMajority;
- qiMajority >>= 1;
- }
+
+ ++qiMajority;
+ qiMajority >>= 1;
even_test = true;
maxIndex = 0;
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
index a5d967af331..6d919f5561a 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_MAP_BUILDER_H__
-#define __FREESTYLE_VIEW_MAP_BUILDER_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -284,5 +283,3 @@ class ViewMapBuilder {
};
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_MAP_BUILDER_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index 4c4e5ce7fe9..3cbf42ed388 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -998,6 +998,7 @@ int load(istream &in, ViewMap *vm, ProgressBar *pb)
if (fe_s) {
bool b;
READ(b);
+ /* NOLINTNEXTLINE: bugprone-infinite-loop */
for (READ(fe_rle1), fe_rle2 = 0; fe_rle1 <= fe_s; fe_rle2 = fe_rle1, READ(fe_rle1)) {
if (b) {
for (unsigned int i = fe_rle2; i < fe_rle1; i++) {
@@ -1023,6 +1024,7 @@ int load(istream &in, ViewMap *vm, ProgressBar *pb)
if (vv_s) {
Nature::VertexNature nature;
READ(nature);
+ /* NOLINTNEXTLINE: bugprone-infinite-loop */
for (READ(vv_rle1), vv_rle2 = 0; vv_rle1 <= vv_s; vv_rle2 = vv_rle1, READ(vv_rle1)) {
if (nature & Nature::T_VERTEX) {
for (unsigned int i = vv_rle2; i < vv_rle1; i++) {
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.h b/source/blender/freestyle/intern/view_map/ViewMapIO.h
index 98d27852c8d..e4c42c094d0 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_MAP_IO_H__
-#define __FREESTYLE_VIEW_MAP_IO_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -102,5 +101,3 @@ template<> istream &read<0>(istream &in, char *)
} // End of namespace ViewMapIO
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_MAP_IO_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIterators.h b/source/blender/freestyle/intern/view_map/ViewMapIterators.h
index 174e25896cc..9956d47469d 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapIterators.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_MAP_ITERATORS_H__
-#define __FREESTYLE_VIEW_MAP_ITERATORS_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -590,5 +589,3 @@ class ViewEdgeIterator : public Iterator {
} // end of namespace ViewEdgeInternal
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_MAP_ITERATORS_H__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
index b6bf51618d8..c6690b1d9dc 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __FREESTYLE_VIEW_MAP_TESSELATOR_H__
-#define __FREESTYLE_VIEW_MAP_TESSELATOR_H__
+#pragma once
/** \file
* \ingroup freestyle
@@ -225,5 +224,3 @@ NodeGroup *ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesIterat
}
} /* namespace Freestyle */
-
-#endif // __FREESTYLE_VIEW_MAP_TESSELATOR_H__