From e0bf635c5c07b2f52d41678f6b58f76fc251ccb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DOTTEL=20Ga=C3=ABl?= Date: Wed, 21 Sep 2022 16:17:29 +0200 Subject: [PATCH] Replace sf::Uint8 with std::uint8_t (#217) --- imconfig-SFML.h | 8 ++++++-- imgui-SFML.cpp | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/imconfig-SFML.h b/imconfig-SFML.h index 4e7634e..1305335 100644 --- a/imconfig-SFML.h +++ b/imconfig-SFML.h @@ -3,6 +3,8 @@ #include #include +#include + #include "imgui-SFML_export.h" #define IM_VEC2_CLASS_EXTRA \ @@ -20,6 +22,8 @@ #define IM_VEC4_CLASS_EXTRA \ ImVec4(const sf::Color& c) : x(c.r / 255.f), y(c.g / 255.f), z(c.b / 255.f), w(c.a / 255.f) {} \ operator sf::Color() const { \ - return sf::Color(static_cast(x * 255.f), static_cast(y * 255.f), \ - static_cast(z * 255.f), static_cast(w * 255.f)); \ + return sf::Color(static_cast(x * 255.f), \ + static_cast(y * 255.f), \ + static_cast(z * 255.f), \ + static_cast(w * 255.f)); \ } diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp index 9711079..ef211e9 100644 --- a/imgui-SFML.cpp +++ b/imgui-SFML.cpp @@ -18,6 +18,7 @@ #include #include // abs #include // offsetof, NULL, size_t +#include // uint8_t #include // memcpy #include @@ -1376,7 +1377,7 @@ void setClipboardText(void* /*userData*/, const char* text) { } const char* getClipboardText(void* /*userData*/) { - std::basic_string tmp = sf::Clipboard::getString().toUtf8(); + std::basic_string tmp = sf::Clipboard::getString().toUtf8(); s_clipboardText = std::string(tmp.begin(), tmp.end()); return s_clipboardText.c_str(); }