diff options
Diffstat (limited to 'source/blender/freestyle/intern/geometry')
-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); } } |