diff --git a/src/stim/diagram/gltf.cc b/src/stim/diagram/gltf.cc index b78fdb64..0dc574ec 100644 --- a/src/stim/diagram/gltf.cc +++ b/src/stim/diagram/gltf.cc @@ -31,14 +31,14 @@ JsonObj GltfScene::_to_json_local() const { JsonObj GltfScene::to_json() { // Clear indices. visit([&](GltfId &item_id, const char *type, const std::function &to_json, uintptr_t abs_id) { - item_id.index = SIZE_MAX; + item_id.index = UINT64_MAX; }); // Re-index. std::map counts; visit([&](GltfId &item_id, const char *type, const std::function &to_json, uintptr_t abs_id) { auto &c = counts[type]; - if (item_id.index == SIZE_MAX || item_id.index == c) { + if (item_id.index == UINT64_MAX || item_id.index == c) { item_id.index = c; c++; } else if (item_id.index > c) { diff --git a/src/stim/diagram/gltf.h b/src/stim/diagram/gltf.h index 1abfc97e..e6adb6d3 100644 --- a/src/stim/diagram/gltf.h +++ b/src/stim/diagram/gltf.h @@ -32,9 +32,9 @@ constexpr size_t GL_NEAREST = 9728; struct GltfId { std::string name; - size_t index; + uint64_t index; - GltfId(std::string name) : name(name), index(SIZE_MAX) { + GltfId(std::string name) : name(name), index(UINT64_MAX) { } GltfId() = delete; }; @@ -125,10 +125,10 @@ struct GltfBuffer { struct GltfSampler { GltfId id; - size_t magFilter; - size_t minFilter; - size_t wrapS; - size_t wrapT; + uint64_t magFilter; + uint64_t minFilter; + uint64_t wrapS; + uint64_t wrapT; void visit(const gltf_visit_callback &callback); JsonObj to_json() const;