Skip to content

Commit

Permalink
fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Sep 30, 2023
1 parent 3f471ec commit 61a30ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/c-tinyusd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<const CTinyUSDPrim *>(pchild);

Expand All @@ -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;
}
Expand Down Expand Up @@ -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<CTinyUSDValue *>(vp); \
}
Expand Down
2 changes: 2 additions & 0 deletions src/pprinter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 61a30ff

Please sign in to comment.