ImGuiColorTextEdit
ImGuiColorTextEdit copied to clipboard
warning produced by gcc
The following warning is produced from the header with gcc 7:
TextEditor.h:125:30: warning: 'TextEditor::Glyph::mColorIndex' is too small to hold all values of 'enum class TextEditor::PaletteIndex'
PaletteIndex mColorIndex : 7;
on the default warning level - and it cannot be easily silenced (without disabling all warnings with -w)
Hm... GCC probably checks against the underlying type, not the actual values.... I removed the type specifier from the enum class declaration. Can you please check whether the warning is gone now?
nope - I still get the warning. What worked for removing it was:
- to switch from
PaletteIndex mColorIndex : 7;toint mColorIndex : 7; - to switch from
enum class PaletteIndextoenum PaletteIndex - to switch from
StringandIdentifiertoString2andIdentifier2
But that is ugly and not type safe...
There is another one:
if (line >= mLines.size())
TextEditor.cpp(103): warning C4018: '>=': signed/unsigned mismatch