[GRASS-SVN] r71478 - grass/branches/releasebranch_7_2/lib/vector/dglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 7 12:47:46 PDT 2017
Author: mmetz
Date: 2017-09-07 12:47:46 -0700 (Thu, 07 Sep 2017)
New Revision: 71478
Modified:
grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v1.h
grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v2.h
Log:
dglib: fix pointer casting (backport from trunk r71477)
Modified: grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v1.h
===================================================================
--- grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v1.h 2017-09-07 19:47:02 UTC (rev 71477)
+++ grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v1.h 2017-09-07 19:47:46 UTC (rev 71478)
@@ -103,13 +103,13 @@
* Node Buffer Utilities
*/
#define DGL_NODEBUFFER_SHIFT_v1(pgrp,o) ((dglInt32_t*)((pgrp)->pNodeBuffer + (o)))
-#define DGL_NODEBUFFER_OFFSET_v1(pgrp,p) ((dglInt32_t)(p - (dglInt32_t *)(pgrp)->pNodeBuffer))
+#define DGL_NODEBUFFER_OFFSET_v1(pgrp,p) ((dglInt32_t)((dglByte_t *)p - (dglByte_t *)(pgrp)->pNodeBuffer))
/*
* Edge Buffer Utilities
*/
#define DGL_EDGEBUFFER_SHIFT_v1(pgrp,o) ((dglInt32_t*)((pgrp)->pEdgeBuffer + (o)))
-#define DGL_EDGEBUFFER_OFFSET_v1(pgrp,pl) ((dglInt32_t)(pl - (dglInt32_t *)(pgrp)->pEdgeBuffer))
+#define DGL_EDGEBUFFER_OFFSET_v1(pgrp,pl) ((dglInt32_t)((dglByte_t *)pl - (dglByte_t *)(pgrp)->pEdgeBuffer))
Modified: grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v2.h
===================================================================
--- grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v2.h 2017-09-07 19:47:02 UTC (rev 71477)
+++ grass/branches/releasebranch_7_2/lib/vector/dglib/graph_v2.h 2017-09-07 19:47:46 UTC (rev 71478)
@@ -106,13 +106,13 @@
* Node Buffer Utilities
*/
#define DGL_NODEBUFFER_SHIFT_v2(pgrp,o) ((dglInt32_t*)((pgrp)->pNodeBuffer + (o)))
-#define DGL_NODEBUFFER_OFFSET_v2(pgrp,p) ((dglInt32_t)(p - (dglInt32_t *)(pgrp)->pNodeBuffer))
+#define DGL_NODEBUFFER_OFFSET_v2(pgrp,p) ((dglInt32_t)((dglByte_t *)p - (dglByte_t *)(pgrp)->pNodeBuffer))
/*
* Edge Buffer Utilities
*/
#define DGL_EDGEBUFFER_SHIFT_v2(pgrp,o) ((dglInt32_t*)((pgrp)->pEdgeBuffer + (o)))
-#define DGL_EDGEBUFFER_OFFSET_v2(pgrp,pl) ((dglInt32_t)(pl - (dglInt32_t *)(pgrp)->pEdgeBuffer))
+#define DGL_EDGEBUFFER_OFFSET_v2(pgrp,pl) ((dglInt32_t)((dglByte_t *)pl - (dglByte_t *)(pgrp)->pEdgeBuffer))
More information about the grass-commit
mailing list