Browse Source

Fixed build warnings on MSVC14 x64 in the D3MF format sources.

Jared Mulconry 8 năm trước cách đây
mục cha
commit
43ef4ec715
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 1 1
      code/D3MFImporter.cpp
  2. 3 3
      code/D3MFOpcPackage.cpp

+ 1 - 1
code/D3MFImporter.cpp

@@ -172,7 +172,7 @@ private:
 
 
                 mesh->mName.Set(name);
                 mesh->mName.Set(name);
                 meshes.push_back(mesh);
                 meshes.push_back(mesh);
-                meshIds.push_back(meshIdx);
+                meshIds.push_back(static_cast<unsigned long>(meshIdx));
                 meshIdx++;
                 meshIdx++;
 
 
             }
             }

+ 3 - 3
code/D3MFOpcPackage.cpp

@@ -123,19 +123,19 @@ voidpf IOSystem2Unzip::open(voidpf opaque, const char* filename, int mode) {
 uLong IOSystem2Unzip::read(voidpf /*opaque*/, voidpf stream, void* buf, uLong size) {
 uLong IOSystem2Unzip::read(voidpf /*opaque*/, voidpf stream, void* buf, uLong size) {
     IOStream* io_stream = (IOStream*) stream;
     IOStream* io_stream = (IOStream*) stream;
 
 
-    return io_stream->Read(buf, 1, size);
+    return static_cast<uLong>(io_stream->Read(buf, 1, size));
 }
 }
 
 
 uLong IOSystem2Unzip::write(voidpf /*opaque*/, voidpf stream, const void* buf, uLong size) {
 uLong IOSystem2Unzip::write(voidpf /*opaque*/, voidpf stream, const void* buf, uLong size) {
     IOStream* io_stream = (IOStream*) stream;
     IOStream* io_stream = (IOStream*) stream;
 
 
-    return io_stream->Write(buf, 1, size);
+    return static_cast<uLong>(io_stream->Write(buf, 1, size));
 }
 }
 
 
 long IOSystem2Unzip::tell(voidpf /*opaque*/, voidpf stream) {
 long IOSystem2Unzip::tell(voidpf /*opaque*/, voidpf stream) {
     IOStream* io_stream = (IOStream*) stream;
     IOStream* io_stream = (IOStream*) stream;
 
 
-    return io_stream->Tell();
+    return static_cast<long>(io_stream->Tell());
 }
 }
 
 
 long IOSystem2Unzip::seek(voidpf /*opaque*/, voidpf stream, uLong offset, int origin) {
 long IOSystem2Unzip::seek(voidpf /*opaque*/, voidpf stream, uLong offset, int origin) {