diff --git a/framework/imgui/src/mm/imgui/widgets/imgui_json_editor.hpp b/framework/imgui/src/mm/imgui/widgets/imgui_json_editor.hpp index d36b92c..a36402d 100644 --- a/framework/imgui/src/mm/imgui/widgets/imgui_json_editor.hpp +++ b/framework/imgui/src/mm/imgui/widgets/imgui_json_editor.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace MM::ImGuiWidgets { @@ -55,16 +56,16 @@ void JsonViewerSimple(const char* name, const JsonObjectType& json) { } break; case JsonObjectType::value_t::number_integer: - ImGui::TextColored(int_color, "%ld", json.template get()); + ImGui::TextColored(int_color, "%" PRId64, json.template get()); break; case JsonObjectType::value_t::number_unsigned: - ImGui::TextColored(unsigned_color, "%lu", json.template get()); + ImGui::TextColored(unsigned_color, "%" PRIu64, json.template get()); break; case JsonObjectType::value_t::number_float: ImGui::TextColored(float_color, "%f", json.template get()); break; case JsonObjectType::value_t::object: - ImGui::TextDisabled("{%d}", json.size()); + ImGui::TextDisabled("{%zu}", json.size()); ImGui::Indent(); for (auto& [key, value] : json.items()) { @@ -74,7 +75,7 @@ void JsonViewerSimple(const char* name, const JsonObjectType& json) { break; case JsonObjectType::value_t::array: - ImGui::TextDisabled("[%d]", json.size()); + ImGui::TextDisabled("[%zu]", json.size()); ImGui::Indent(); for (auto& [key, value] : json.items()) { @@ -103,9 +104,9 @@ void JsonViewerTree(const char* name, const JsonObjectType& json) { ImGui::SameLine(); if (json.is_object()) { - ImGui::TextDisabled("{%d}", json.size()); + ImGui::TextDisabled("{%zu}", json.size()); } else { // is_array() - ImGui::TextDisabled("[%d]", json.size()); + ImGui::TextDisabled("[%zu]", json.size()); } if (tree_open) { @@ -143,10 +144,10 @@ void JsonViewerTree(const char* name, const JsonObjectType& json) { } break; case JsonObjectType::value_t::number_integer: - ImGui::TextColored(int_color, "%ld", json.template get()); + ImGui::TextColored(int_color, "%" PRId64, json.template get()); break; case JsonObjectType::value_t::number_unsigned: - ImGui::TextColored(unsigned_color, "%lu", json.template get()); + ImGui::TextColored(unsigned_color, "%" PRIu64, json.template get()); break; case JsonObjectType::value_t::number_float: ImGui::TextColored(float_color, "%f", json.template get()); @@ -200,9 +201,9 @@ void JsonEditor(const char* name, JsonObjectType& json) { ImGui::SameLine(); if (json.is_object()) { - ImGui::TextDisabled("{%d}", json.size()); + ImGui::TextDisabled("{%zu}", json.size()); } else { // is_array() - ImGui::TextDisabled("[%d]", json.size()); + ImGui::TextDisabled("[%zu]", json.size()); } if (tree_open) {