Changed C-style casts to static_cast.
authorJames Walker <jamesw@frameforge3d.com>
Thu, 18 Aug 2016 17:55:24 +0000 (10:55 -0700)
committerJames Walker <jamesw@frameforge3d.com>
Thu, 18 Aug 2016 17:55:24 +0000 (10:55 -0700)
code/glTFAssetWriter.inl

index f14afc4..415db67 100644 (file)
@@ -105,7 +105,7 @@ namespace glTF {
                 type = "arraybuffer";
         }
 
-        obj.AddMember("byteLength", (uint64_t)b.byteLength, w.mAl);
+        obj.AddMember("byteLength", static_cast<uint64_t>(b.byteLength), w.mAl);
         obj.AddMember("type", StringRef(type), w.mAl);
         obj.AddMember("uri", Value(dataURI, w.mAl).Move(), w.mAl);
     }
@@ -113,8 +113,8 @@ namespace glTF {
     inline void Write(Value& obj, BufferView& bv, AssetWriter& w)
     {
         obj.AddMember("buffer", Value(bv.buffer->id, w.mAl).Move(), w.mAl);
-        obj.AddMember("byteOffset", (uint64_t)bv.byteOffset, w.mAl);
-        obj.AddMember("byteLength", (uint64_t)bv.byteLength, w.mAl);
+        obj.AddMember("byteOffset", static_cast<uint64_t>(bv.byteOffset), w.mAl);
+        obj.AddMember("byteLength", static_cast<uint64_t>(bv.byteLength), w.mAl);
         obj.AddMember("target", int(bv.target), w.mAl);
     }