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:
authorAnkit Meel <ankitjmeel@gmail.com>2020-11-07 15:47:12 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-11-07 16:18:13 +0300
commit4525049aa0cf818f6483dce589ac9791eb562338 (patch)
treebdf5258903fb8435bf38a1925c9c32f32c20616c /source/blender/freestyle
parenta452fcb9a5495ecbbbaedb7e5c631814c7f4372a (diff)
Cleanup: Clang-tidy, modernize-concat-nested-namespaces
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/application/AppConfig.cpp8
-rw-r--r--source/blender/freestyle/intern/geometry/GeomUtils.cpp8
-rw-r--r--source/blender/freestyle/intern/geometry/matrix_util.cpp12
-rw-r--r--source/blender/freestyle/intern/geometry/normal_cycle.cpp8
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp8
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp9
-rw-r--r--source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp8
-rw-r--r--source/blender/freestyle/intern/stroke/ContextFunctions.cpp8
-rw-r--r--source/blender/freestyle/intern/system/StringUtils.cpp8
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.cpp8
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.cpp8
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp8
12 files changed, 24 insertions, 77 deletions
diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp
index 00c473f6d3b..90ded5045dc 100644
--- a/source/blender/freestyle/intern/application/AppConfig.cpp
+++ b/source/blender/freestyle/intern/application/AppConfig.cpp
@@ -28,9 +28,7 @@ using namespace std;
#include "BKE_appdir.h"
-namespace Freestyle {
-
-namespace Config {
+namespace Freestyle::Config {
Path *Path::_pInstance = nullptr;
Path::Path()
@@ -85,6 +83,4 @@ string Path::getEnvVar(const string &iEnvVarName)
return value;
}
-} // namespace Config
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Config
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
index 925bc3c9f94..51727fd2288 100644
--- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp
+++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
@@ -21,9 +21,7 @@
#include "GeomUtils.h"
-namespace Freestyle {
-
-namespace GeomUtils {
+namespace Freestyle::GeomUtils {
// This internal procedure is defined below.
bool intersect2dSegPoly(Vec2r *seg, Vec2r *poly, unsigned n);
@@ -846,6 +844,4 @@ inline void fromCoordAToCoordB(const Vec3r &p, Vec3r &q, const real transform[4]
}
}
-} // end of namespace GeomUtils
-
-} /* namespace Freestyle */
+} // namespace Freestyle::GeomUtils
diff --git a/source/blender/freestyle/intern/geometry/matrix_util.cpp b/source/blender/freestyle/intern/geometry/matrix_util.cpp
index 637c2d05574..5b5d9582e8f 100644
--- a/source/blender/freestyle/intern/geometry/matrix_util.cpp
+++ b/source/blender/freestyle/intern/geometry/matrix_util.cpp
@@ -33,11 +33,7 @@
#include "BLI_math.h"
-namespace Freestyle {
-
-namespace OGF {
-
-namespace MatrixUtil {
+namespace Freestyle::OGF::MatrixUtil {
static const double EPS = 0.00001;
static int MAX_ITER = 100;
@@ -252,8 +248,4 @@ void semi_definite_symmetric_eigen(const double *mat, int n, double *eigen_vec,
//_________________________________________________________
-} // namespace MatrixUtil
-
-} // namespace OGF
-
-} /* namespace Freestyle */
+} // namespace Freestyle::OGF::MatrixUtil
diff --git a/source/blender/freestyle/intern/geometry/normal_cycle.cpp b/source/blender/freestyle/intern/geometry/normal_cycle.cpp
index d02b5cc2d5b..01d52646eb0 100644
--- a/source/blender/freestyle/intern/geometry/normal_cycle.cpp
+++ b/source/blender/freestyle/intern/geometry/normal_cycle.cpp
@@ -32,9 +32,7 @@
#include "normal_cycle.h"
#include "matrix_util.h"
-namespace Freestyle {
-
-namespace OGF {
+namespace Freestyle::OGF {
//_________________________________________________________
@@ -88,6 +86,4 @@ void NormalCycle::end()
//_________________________________________________________
-} // namespace OGF
-
-} /* namespace Freestyle */
+} // namespace Freestyle::OGF
diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
index 95d4735ddc4..4e0253c88e9 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
@@ -25,9 +25,7 @@
#include "../view_map/Functions0D.h"
#include "../view_map/SteerableViewMap.h"
-namespace Freestyle {
-
-namespace Functions0D {
+namespace Freestyle::Functions0D {
int DensityF0D::operator()(Interface0DIterator &iter)
{
@@ -114,6 +112,4 @@ int GetViewMapGradientNormF0D::operator()(Interface0DIterator &iter)
return 0;
}
-} // end of namespace Functions0D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions0D
diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
index c01d95211d8..7a516470e6b 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
@@ -24,10 +24,7 @@
#include "../view_map/SteerableViewMap.h"
-namespace Freestyle {
-
-// FIXME
-namespace Functions1D {
+namespace Freestyle::Functions1D {
int GetSteerableViewMapDensityF1D::operator()(Interface1D &inter)
{
@@ -127,6 +124,4 @@ int GetViewMapGradientNormF1D::operator()(Interface1D &inter)
return 0;
}
-} // namespace Functions1D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions1D
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
index af247851911..335bfdffe90 100644
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
@@ -40,9 +40,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-namespace Freestyle {
-
-namespace StrokeShaders {
+namespace Freestyle::StrokeShaders {
//
// Thickness modifiers
@@ -697,6 +695,4 @@ int TipRemoverShader::shade(Stroke &stroke) const
return 0;
}
-} // end of namespace StrokeShaders
-
-} /* namespace Freestyle */
+} // namespace Freestyle::StrokeShaders
diff --git a/source/blender/freestyle/intern/stroke/ContextFunctions.cpp b/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
index 5609013a417..c6140f463ab 100644
--- a/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
+++ b/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
@@ -26,9 +26,7 @@
#include "../system/TimeStamp.h"
-namespace Freestyle {
-
-namespace ContextFunctions {
+namespace Freestyle::ContextFunctions {
unsigned GetTimeStampCF()
{
@@ -78,6 +76,4 @@ FEdge *GetSelectedFEdgeCF()
return Canvas::getInstance()->selectedFEdge();
}
-} // namespace ContextFunctions
-
-} /* namespace Freestyle */
+} // namespace Freestyle::ContextFunctions
diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp
index fb156217306..b488987dd41 100644
--- a/source/blender/freestyle/intern/system/StringUtils.cpp
+++ b/source/blender/freestyle/intern/system/StringUtils.cpp
@@ -24,9 +24,7 @@
#include "StringUtils.h"
#include "FreestyleConfig.h"
-namespace Freestyle {
-
-namespace StringUtils {
+namespace Freestyle::StringUtils {
void getPathName(const string &path, const string &base, vector<string> &pathnames)
{
@@ -57,6 +55,4 @@ void getPathName(const string &path, const string &base, vector<string> &pathnam
}
}
-} // end of namespace StringUtils
-
-} /* namespace Freestyle */
+} // namespace Freestyle::StringUtils
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.cpp b/source/blender/freestyle/intern/view_map/Functions0D.cpp
index 5a9e1207784..4ea163c47cf 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp
@@ -26,9 +26,7 @@
using namespace std;
-namespace Freestyle {
-
-namespace Functions0D {
+namespace Freestyle::Functions0D {
// Internal function
FEdge *getFEdge(Interface0D &it1, Interface0D &it2)
@@ -388,6 +386,4 @@ int GetOccludeeF0D::operator()(Interface0DIterator &iter)
return 0;
}
-} // end of namespace Functions0D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions0D
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.cpp b/source/blender/freestyle/intern/view_map/Functions1D.cpp
index 6194e7b4eed..999d7f6e753 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions1D.cpp
@@ -23,9 +23,7 @@
using namespace std;
-namespace Freestyle {
-
-namespace Functions1D {
+namespace Freestyle::Functions1D {
int GetXF1D::operator()(Interface1D &inter)
{
@@ -266,6 +264,4 @@ void getShapeF1D(Interface1D &inter, set<ViewShape *> &oShapes)
}
}
-} // end of namespace Functions1D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions1D
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index d71bc5758c9..aed5d6b5adc 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -50,9 +50,7 @@
} \
(void)0
-namespace Freestyle {
-
-namespace ViewMapIO {
+namespace Freestyle::ViewMapIO {
namespace Internal {
@@ -1307,6 +1305,4 @@ string getModelsPath()
} // namespace Options
-} // End of namespace ViewMapIO
-
-} /* namespace Freestyle */
+} // namespace Freestyle::ViewMapIO