Explorar o código

Assimp master head fixes for failure to compile (#5899)

* Fix unknown pragma error on msys2 mingw

* Fix missing assignment operator on msys2 mingw

Default is omitted by compiler because custom copy constructor

* Fix redefinition of _1 and _2 error on msys2 mingw

fix is converting it to lambda as clang is claiming that is
preferred

* Fix strncpy warnings about truncation

* Fix missing assignment operator error on clang

* Update glTFImporter.cpp

* Update glTF2Importer.cpp

---------

Co-authored-by: Kim Kulling <[email protected]>
Engin Manap hai 9 meses
pai
achega
2f6dcdfd72

+ 1 - 0
code/AssetLib/glTF/glTFImporter.cpp

@@ -658,6 +658,7 @@ void glTFImporter::ImportEmbeddedTextures(glTF::Asset &r) {
                 if (strncmp(ext, "jpeg", 4) == 0) {
                 if (strncmp(ext, "jpeg", 4) == 0) {
                     ext = "jpg";
                     ext = "jpg";
                 }
                 }
+
                 tex->achFormatHint[3] = '\0';
                 tex->achFormatHint[3] = '\0';
                 size_t len = strlen(ext);
                 size_t len = strlen(ext);
                 if (len > 3) len = 3;
                 if (len > 3) len = 3;

+ 1 - 0
code/Common/Maybe.h

@@ -83,6 +83,7 @@ struct Maybe {
 
 
     Maybe &operator&() = delete;
     Maybe &operator&() = delete;
     Maybe(const Maybe &) = delete;
     Maybe(const Maybe &) = delete;
+    Maybe &operator=(const Maybe &) = default;
 
 
 private:
 private:
     T _val;
     T _val;

+ 8 - 1
contrib/clipper/clipper.cpp

@@ -264,7 +264,14 @@ class Int128
     Int128(const Int128 &val): lo(val.lo), hi(val.hi){}
     Int128(const Int128 &val): lo(val.lo), hi(val.hi){}
 
 
     Int128(const long64& _hi, const ulong64& _lo): lo(_lo), hi(_hi){}
     Int128(const long64& _hi, const ulong64& _lo): lo(_lo), hi(_hi){}
-    
+
+  Int128& operator = (const Int128 &val)
+    {
+      lo = val.lo;
+      hi = val.hi;
+      return *this;
+    }
+
     Int128& operator = (const long64 &val)
     Int128& operator = (const long64 &val)
     {
     {
       lo = (ulong64)val;
       lo = (ulong64)val;

+ 1 - 1
contrib/openddlparser/code/OpenDDLParser.cpp

@@ -149,7 +149,7 @@ void OpenDDLParser::logToStream(FILE *f, LogSeverity severity, const std::string
 
 
 OpenDDLParser::logCallback OpenDDLParser::StdLogCallback (FILE *destination) {
 OpenDDLParser::logCallback OpenDDLParser::StdLogCallback (FILE *destination) {
     using namespace std::placeholders;
     using namespace std::placeholders;
-    return std::bind(logToStream, destination ? destination : stderr, _1, _2);
+    return [capture0 = destination ? destination : stderr](auto && PH1, auto && PH2) { logToStream(capture0, std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2)); };
 }
 }
 
 
 void OpenDDLParser::setLogCallback(logCallback callback) {
 void OpenDDLParser::setLogCallback(logCallback callback) {