From e6eafd6fa8394c3fd41f34d0d4b6ffea771e46ca Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 26 Oct 2014 15:08:28 +0000 Subject: [PATCH] Fixed warnings for GCC -Wpedantic --- imconfig.h | 2 +- imgui.cpp | 10 +++++----- imgui.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/imconfig.h b/imconfig.h index 18a64b2b..e38c59cd 100644 --- a/imconfig.h +++ b/imconfig.h @@ -39,6 +39,6 @@ namespace ImGui { void Value(const char* prefix, const MyVec2& v, const char* float_format = NULL); void Value(const char* prefix, const MyVec4& v, const char* float_format = NULL); -}; +} */ diff --git a/imgui.cpp b/imgui.cpp index b7fee3aa..2e5b5e6c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -243,7 +243,7 @@ static void FocusWindow(ImGuiWindow* window); static ImGuiWindow* FindWindow(const char* name); static ImGuiWindow* FindHoveredWindow(ImVec2 pos, bool excluding_childs); -}; // namespace ImGui +} // namespace ImGui //----------------------------------------------------------------------------- // Platform dependant default implementations @@ -3842,7 +3842,7 @@ bool RadioButton(const char* label, int* v, int v_button) return pressed; } -}; // namespace ImGui +} // namespace ImGui // Wrapper for stb_textedit.h to edit text (our wrapper is for: statically sized buffer, single-line, ASCII, fixed-width font) int STB_TEXTEDIT_STRINGLEN(const STB_TEXTEDIT_STRING* obj) { return (int)ImStrlenW(obj->Text); } @@ -5028,7 +5028,7 @@ void Color(const char* prefix, unsigned int v) ImGui::ColorButton(col, true); } -}; // namespace ImGui +} // namespace ImGui //----------------------------------------------------------------------------- // ImDrawList @@ -6464,7 +6464,7 @@ void ShowTestWindow(bool* open) } // End of Sample code -}; // namespace ImGui +} // namespace ImGui //----------------------------------------------------------------------------- // Font data @@ -6673,7 +6673,7 @@ void GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const voi if (png_size) *png_size = proggy_clean_13_png_size; } -}; +} // namespace ImGui //----------------------------------------------------------------------------- diff --git a/imgui.h b/imgui.h index 481a93e6..311b1059 100644 --- a/imgui.h +++ b/imgui.h @@ -63,7 +63,7 @@ namespace ImGui void* MemAlloc(size_t sz); void MemFree(void* ptr); void* MemRealloc(void* ptr, size_t sz); -}; +} // std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug). // Use '#define ImVector std::vector' if you want to use the STL type or your own type. @@ -279,7 +279,7 @@ namespace ImGui void GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const void** png_data, unsigned int* png_size); ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, const bool hide_text_after_hash = true); -}; // namespace ImGui +} // namespace ImGui // Flags for ImGui::Begin() enum ImGuiWindowFlags_