santaclose / ImGuiColorTextEdit

Colorizing text editor for ImGui
MIT License
67 stars 18 forks source link

C++14 initialization #31

Open sonoro1234 opened 1 week ago

sonoro1234 commented 1 week ago
diff --git a/cwrappers/ImGuiColorTextEdit/TextEditor.h b/cwrappers/ImGuiColorTextEdit/TextEditor.h
index 923d2dc5..5a03d9ca 100644
--- a/cwrappers/ImGuiColorTextEdit/TextEditor.h
+++ b/cwrappers/ImGuiColorTextEdit/TextEditor.h
@@ -239,7 +239,7 @@ private:
        {
                int mCurrentCursor = 0;
                int mLastAddedCursor = 0;
-               std::vector<Cursor> mCursors = { {{0,0}} };
+               std::vector<Cursor> mCursors = { Cursor{} };
                void AddCursor();
                int GetLastAddedCursorIndex();
                void SortCursorsFromTopToBottom();

Is needed to compile with c++11 (imgui default)