diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-18 06:13:36 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-18 06:13:36 +0400 |
commit | 68715c5ca7c148f511ac1a8136e7590602895947 (patch) | |
tree | ddaf2b0eb4035e799bbc2e43ec5f1f13309e8387 /source/blender/freestyle/intern/geometry/Grid.h | |
parent | 94ae0232b0337ab70cecaef03cd845887cd36eaa (diff) |
A patch set from Bastien Montagne (thanks!) for silencing build warnings (from gcc 4.7),
mostly by commenting out unused variables, or using the BLI's SET_UINT_IN_POINTER macro.
Diffstat (limited to 'source/blender/freestyle/intern/geometry/Grid.h')
-rw-r--r-- | source/blender/freestyle/intern/geometry/Grid.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 40bd0911c9c..8b237673b8a 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -37,6 +37,9 @@ #include <cstring> // for memset #include <float.h> +#ifndef _MSC_VER +#include <stdint.h> // For SET_UINT_IN_POINTER, i.e. uintptr_t. +#endif #include <vector> #include "Geom.h" @@ -45,6 +48,10 @@ #include "../system/FreestyleConfig.h" +extern "C" { + #include "BLI_utildefines.h" +} + using namespace std; using namespace Geometry; @@ -325,8 +332,8 @@ protected: visitor.discoverCell(current_cell); OccludersSet& occluders = current_cell->getOccluders(); // FIXME: I had forgotten the ref & for (OccludersSet::iterator it = occluders.begin(); it != occluders.end(); it++) { - if ((unsigned long)(*it)->userdata2 != _timestamp) { - (*it)->userdata2 = (void*)_timestamp; + if (GET_UINT_FROM_POINTER((*it)->userdata2) != _timestamp) { + (*it)->userdata2 = SET_UINT_IN_POINTER(_timestamp); visitor.examineOccluder(*it); } } |