Remove mingw-w64 errors from loss of precision by converting 64bit pointers to ints. All cases found were harmless and the error behaviour could be turned off by the -fpermissive flag but I'd rather keep that off to detect any real problems should they arise.
This commit is contained in:
@@ -21,7 +21,14 @@
|
||||
#endif
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
#if defined(_WIN64)
|
||||
# ifdef __MINGW64__
|
||||
# include <basetsd.h>
|
||||
# endif
|
||||
typedef __int64 int_ptr;
|
||||
#else
|
||||
typedef long int_ptr;
|
||||
#endif
|
||||
/******************************************************************************
|
||||
* Default Constructor
|
||||
*****************************************************************************/
|
||||
@@ -164,7 +171,7 @@ int ntlGeometryObjModel::initModel(int numVertices, float *vertices, int numTria
|
||||
}
|
||||
|
||||
//fprintf(stderr,"initModel DEBUG %d \n",channelSize);
|
||||
debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
|
||||
debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
|
||||
if(channelVertices && (channelSize>0)) {
|
||||
vector<ntlSetVec3f> aniverts;
|
||||
vector<ntlSetVec3f> aninorms;
|
||||
|
29
intern/elbeem/patches/mingw64_nopermissive.patch
Normal file
29
intern/elbeem/patches/mingw64_nopermissive.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
Index: intern/ntl_geometrymodel.cpp
|
||||
===================================================================
|
||||
--- intern/ntl_geometrymodel.cpp (revision 45919)
|
||||
+++ intern/ntl_geometrymodel.cpp (working copy)
|
||||
@@ -21,7 +21,14 @@
|
||||
#endif
|
||||
#endif // WIN32
|
||||
|
||||
-
|
||||
+#if defined(_WIN64)
|
||||
+# ifdef __MINGW64__
|
||||
+# include <basetsd.h>
|
||||
+# endif
|
||||
+typedef __int64 int_ptr;
|
||||
+#else
|
||||
+typedef long int_ptr;
|
||||
+#endif
|
||||
/******************************************************************************
|
||||
* Default Constructor
|
||||
*****************************************************************************/
|
||||
@@ -164,7 +171,7 @@
|
||||
}
|
||||
|
||||
//fprintf(stderr,"initModel DEBUG %d \n",channelSize);
|
||||
- debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
|
||||
+ debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
|
||||
if(channelVertices && (channelSize>0)) {
|
||||
vector<ntlSetVec3f> aniverts;
|
||||
vector<ntlSetVec3f> aninorms;
|
Reference in New Issue
Block a user