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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-04-17 07:55:17 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-04-17 09:37:11 +0400
commit68aea619f512afb0fd9f4b06313cd2ea8b896146 (patch)
tree2a9779bf70ca7ed587b54020da855254559a3ce2
parent3458bad12d4ba7c1184a44fcdabfef265335d30c (diff)
Replaced assert() with BLI_assert().
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp5
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h3
-rw-r--r--source/blender/freestyle/intern/geometry/FastGrid.cpp21
-rw-r--r--source/blender/freestyle/intern/geometry/FastGrid.h2
-rw-r--r--source/blender/freestyle/intern/geometry/Grid.cpp5
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp3
-rw-r--r--source/blender/freestyle/intern/system/PseudoNoise.cpp1
7 files changed, 22 insertions, 18 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 91a7547895f..0c81a5899b2 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 8a16a2b5c2a..a1fb9fade58 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 438cac3c209..ddfc8bdd20c 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 e292589b7cf..0982c1a7d7c 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 49e115b4333..371c63318de 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 e5dc27a0c57..2b281a24962 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 6083a46d609..4949cb8c430 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"