From 93f305a734097a4a73b17f393971b3a18d4fd496 Mon Sep 17 00:00:00 2001 From: Craig Gidney Date: Fri, 2 Aug 2024 18:18:50 -0700 Subject: [PATCH] guh --- src/stim/diagram/gltf.cc | 4 ++-- src/stim/diagram/gltf.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/stim/diagram/gltf.cc b/src/stim/diagram/gltf.cc index b78fdb644..0dc574ec2 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 1abfc97e8..e6adb6d3d 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;