Commit: 68aea619f512afb0fd9f4b06313cd2ea8b896146
Author: Tamito Kajiyama
Date:   Thu Apr 17 12:55:17 2014 +0900
https://developer.blender.org/rB68aea619f512afb0fd9f4b06313cd2ea8b896146

Replaced assert() with BLI_assert().

===================================================================

M       source/blender/freestyle/intern/application/Controller.cpp
M       source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h
M       source/blender/freestyle/intern/geometry/FastGrid.cpp
M       source/blender/freestyle/intern/geometry/FastGrid.h
M       source/blender/freestyle/intern/geometry/Grid.cpp
M       source/blender/freestyle/intern/stroke/Curve.cpp
M       source/blender/freestyle/intern/system/PseudoNoise.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/application/Controller.cpp 
b/source/blender/freestyle/intern/application/Controller.cpp
index 91a7547..0c81a58 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -66,6 +66,7 @@ extern "C" {
 #include "../blender_interface/BlenderStyleModule.h"
 
 #include "BKE_global.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_freestyle_types.h"
 
@@ -194,14 +195,14 @@ void Controller::setRenderMonitor(RenderMonitor 
*iRenderMonitor)
 void Controller::setPassDiffuse(float *buf, int width, int height)
 {
        AppCanvas *app_canvas = dynamic_cast<AppCanvas *>(_Canvas);
-       assert(app_canvas != 0);
+       BLI_assert(app_canvas != 0);
        app_canvas->setPassDiffuse(buf, width, height);
 }
 
 void Controller::setPassZ(float *buf, int width, int height)
 {
        AppCanvas *app_canvas = dynamic_cast<AppCanvas *>(_Canvas);
-       assert(app_canvas != 0);
+       BLI_assert(app_canvas != 0);
        app_canvas->setPassZ(buf, width, height);
 }
 
diff --git 
a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h 
b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h
index 8a16a2b..a1fb9fa 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h
@@ -32,6 +32,7 @@ extern "C" {
 #include "BKE_global.h"
 #include "BKE_library.h"
 #include "BKE_text.h"
+#include "BLI_utildefines.h"
 }
 
 namespace Freestyle {
@@ -52,7 +53,7 @@ protected:
        virtual int interpret()
        {
                PythonInterpreter *py_inter = 
dynamic_cast<PythonInterpreter*>(_inter);
-               assert(py_inter != 0);
+               BLI_assert(py_inter != 0);
                return py_inter->interpretText(_text, getFileName());
        }
 
diff --git a/source/blender/freestyle/intern/geometry/FastGrid.cpp 
b/source/blender/freestyle/intern/geometry/FastGrid.cpp
index 438cac3..ddfc8bd 100644
--- a/source/blender/freestyle/intern/geometry/FastGrid.cpp
+++ b/source/blender/freestyle/intern/geometry/FastGrid.cpp
@@ -28,6 +28,7 @@
 #include "FastGrid.h"
 
 #include "BKE_global.h"
+#include "BLI_utildefines.h"
 
 namespace Freestyle {
 
@@ -63,21 +64,21 @@ Cell *FastGrid::getCell(const Vec3u& p)
                     << " " << _cells_size << endl;
        }
 #endif
-       assert(_cells || ("_cells is a null pointer"));
-       assert((_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]) < 
_cells_size);
-       assert(p[0] < _cells_nb[0]);
-       assert(p[1] < _cells_nb[1]);
-       assert(p[2] < _cells_nb[2]);
+       BLI_assert(_cells || ("_cells is a null pointer"));
+       BLI_assert((_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]) < 
_cells_size);
+       BLI_assert(p[0] < _cells_nb[0]);
+       BLI_assert(p[1] < _cells_nb[1]);
+       BLI_assert(p[2] < _cells_nb[2]);
        return _cells[_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]];
 }
 
 void FastGrid::fillCell(const Vec3u& p, Cell& cell)
 {
-       assert(_cells || ("_cells is a null pointer"));
-       assert((_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]) < 
_cells_size);
-       assert(p[0] < _cells_nb[0]);
-       assert(p[1] < _cells_nb[1]);
-       assert(p[2] < _cells_nb[2]);
+       BLI_assert(_cells || ("_cells is a null pointer"));
+       BLI_assert((_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]) < 
_cells_size);
+       BLI_assert(p[0] < _cells_nb[0]);
+       BLI_assert(p[1] < _cells_nb[1]);
+       BLI_assert(p[2] < _cells_nb[2]);
        _cells[_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]] = &cell;
 }
 
diff --git a/source/blender/freestyle/intern/geometry/FastGrid.h 
b/source/blender/freestyle/intern/geometry/FastGrid.h
index e292589..0982c1a 100644
--- a/source/blender/freestyle/intern/geometry/FastGrid.h
+++ b/source/blender/freestyle/intern/geometry/FastGrid.h
@@ -28,8 +28,6 @@
  *  \date 30/07/2002
  */
 
-#include <cassert>
-
 #include "Grid.h"
 
 namespace Freestyle {
diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp 
b/source/blender/freestyle/intern/geometry/Grid.cpp
index 49e115b..371c633 100644
--- a/source/blender/freestyle/intern/geometry/Grid.cpp
+++ b/source/blender/freestyle/intern/geometry/Grid.cpp
@@ -25,12 +25,13 @@
  *  \date 30/07/2002
  */
 
-#include <cassert>
 #include <stdexcept>
 
 #include "BBox.h"
 #include "Grid.h"
 
+#include "BLI_utildefines.h"
+
 namespace Freestyle {
 
 // Grid Visitors
@@ -366,7 +367,7 @@ bool Grid::initInfiniteRay (const Vec3r &orig, const Vec3r& 
dir, unsigned timest
                // is the ray intersecting the box?
                real tmin(-1.0), tmax(-1.0);
                if (GeomUtils::intersectRayBBox(orig, _ray_dir, boxMin, boxMax, 
0, _t_end, tmin, tmax)) {
-                       assert(tmin != -1.0);
+                       BLI_assert(tmin != -1.0);
                        Vec3r newOrig = orig + tmin * _ray_dir;
                        for (unsigned int i = 0; i < 3; i++) {
                                _current_cell[i] = (unsigned)floor((newOrig[i] 
- _orig[i]) / _cell_size[i]);
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp 
b/source/blender/freestyle/intern/stroke/Curve.cpp
index e5dc27a..2b281a2 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -30,6 +30,7 @@
 #include "CurveIterators.h"
 
 #include "BKE_global.h"
+#include "BLI_utildefines.h"
 
 namespace Freestyle {
 
@@ -158,7 +159,7 @@ iA_B_eq_iB_A:
                }
                cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, 
CurvePoint *iB, float t3)" << endl;
        }
-       assert(__A != 0 && __B != 0);
+       BLI_assert(__A != 0 && __B != 0);
 
 #if 0
        _Point2d = __A->point2d() + _t2d * (__B->point2d() - __A->point2d());
diff --git a/source/blender/freestyle/intern/system/PseudoNoise.cpp 
b/source/blender/freestyle/intern/system/PseudoNoise.cpp
index 6083a46..4949cb8 100644
--- a/source/blender/freestyle/intern/system/PseudoNoise.cpp
+++ b/source/blender/freestyle/intern/system/PseudoNoise.cpp
@@ -26,6 +26,7 @@
  */
 
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "PseudoNoise.h"
 #include "RandGen.h"

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to