summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/patches/0001-assimp-Fix-type-warnings.patch
blob: 1d97a64b458c62e4a9ee15169f9a0b094e57a344 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -ur assimpGIT/code/AssxmlExporter.cpp assimp/code/AssxmlExporter.cpp
--- assimpGIT/code/AssxmlExporter.cpp	2016-12-08 14:13:07.000000000 -0500
+++ assimp/code/AssxmlExporter.cpp	2016-12-08 09:23:22.000000000 -0500
@@ -72,7 +72,7 @@
         return -1;
     }
 
-    static const size_t Size = 4096;
+    static const int Size = 4096;
     char sz[ Size ];
     size_t len( strlen( format ) );
     ::memset( sz, '\0', Size );
diff -ur assimpGIT/code/glTFAssetWriter.inl assimp/code/glTFAssetWriter.inl
--- assimpGIT/code/glTFAssetWriter.inl	2016-12-08 14:13:07.000000000 -0500
+++ assimp/code/glTFAssetWriter.inl	2016-12-08 10:14:27.000000000 -0500
@@ -56,7 +56,7 @@
         inline Value& MakeValue(Value& val, float(&r)[N], MemoryPoolAllocator<>& al) {
             val.SetArray();
             val.Reserve(N, al);
-            for (int i = 0; i < N; ++i) {
+            for (decltype(N) i = 0; i < N; ++i) {
                 val.PushBack(r[i], al);
             }
             return val;
diff -ur assimpGIT/contrib/openddlparser/code/OpenDDLExport.cpp assimp/contrib/openddlparser/code/OpenDDLExport.cpp
--- assimpGIT/contrib/openddlparser/code/OpenDDLExport.cpp	2016-12-08 14:13:07.000000000 -0500
+++ assimp/contrib/openddlparser/code/OpenDDLExport.cpp	2016-12-08 09:23:22.000000000 -0500
@@ -280,7 +280,7 @@
         statement += "[";
         char buffer[ 256 ];
         ::memset( buffer, '\0', 256 * sizeof( char ) );
-        sprintf( buffer, "%d", numItems );
+        sprintf( buffer, "%d", int(numItems) );
         statement += buffer;
         statement += "]";
     }
diff -ur assimpGIT/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h assimp/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
--- assimpGIT/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h	2016-12-08 14:13:07.000000000 -0500
+++ assimp/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h	2016-12-08 09:23:22.000000000 -0500
@@ -84,7 +84,7 @@
 template<class T>
 inline
 bool isNumeric( const T in ) {
-	return ( chartype_table[ in ] == 1 );
+	return ( chartype_table[ static_cast<int>( in ) ] == 1 );
 }
 
 template<class T>