diff --git a/src/c-tinyusd.cc b/src/c-tinyusd.cc index ee29de6da..5a41f895f 100644 --- a/src/c-tinyusd.cc +++ b/src/c-tinyusd.cc @@ -1116,7 +1116,7 @@ int c_tinyusd_prim_get_child(const CTinyUSDPrim *prim, return 0; } - const tinyusdz::Prim *pchild = &pprim->children()[child_index]; + const tinyusdz::Prim *pchild = &pprim->children()[size_t(child_index)]; (*child_prim) = reinterpret_cast(pchild); @@ -1133,7 +1133,7 @@ int c_tinyusd_prim_del_child(CTinyUSDPrim *prim, uint64_t child_idx) { return 0; } - pprim->children().erase(pprim->children().begin() + int64_t(child_idx)); + pprim->children().erase(pprim->children().begin() + ssize_t(child_idx)); return 1; } @@ -2082,8 +2082,8 @@ CTinyUSDValue *c_tinyusd_value_new_array_##__tyname(uint64_t n, const __cty *val /* ensure C++ and C types has same size. */ \ static_assert(sizeof(__cppty) == sizeof(__cty), ""); \ std::vector<__cppty> cppvalarray; \ - cppvalarray.resize(n); \ - memcpy(cppvalarray.data(), &vals, sizeof(__cppty) * n); \ + cppvalarray.resize(size_t(n)); \ + memcpy(cppvalarray.data(), &vals, sizeof(__cppty) * size_t(n)); \ tinyusdz::value::Value *vp = new tinyusdz::value::Value(std::move(cppvalarray)); \ return reinterpret_cast(vp); \ } diff --git a/src/pprinter.hh b/src/pprinter.hh index 44b51d065..720596b4b 100644 --- a/src/pprinter.hh +++ b/src/pprinter.hh @@ -131,6 +131,8 @@ std::string to_string(const GeomPoints &pts, const uint32_t indent = 0, bool closing_brace = true); std::string to_string(const GeomBasisCurves &curves, const uint32_t indent = 0, bool closing_brace = true); +std::string to_string(const GeomNurbsCurves &curves, const uint32_t indent = 0, + bool closing_brace = true); std::string to_string(const GeomCapsule &geom, const uint32_t indent = 0, bool closing_brace = true); std::string to_string(const GeomCone &geom, const uint32_t indent = 0,