MSVC gives warning C4267 for this line:
|
inline int GetLineCount() const { return mLines.size(); } |
The warning is generated because std::vector::size return std::size_t but the function in question returns an int so there "could" be data loss. Practically, having a file with max 32bit lines is nuts and won't happen but still, the warning is there for everyone who #include "TextEditor.h". I think the users of ImGuiColorTextEdit shouldn't have the warning in their build. I implemented 3 fixes for this. Pick your preferred one, or propose another and I'll implement it.
MSVC gives warning C4267 for this line:
ImGuiColorTextEdit/TextEditor.h
Line 46 in 4a04b16
The warning is generated because
std::vector::sizereturnstd::size_tbut the function in question returns anintso there "could" be data loss. Practically, having a file with max 32bit lines is nuts and won't happen but still, the warning is there for everyone who#include "TextEditor.h". I think the users of ImGuiColorTextEdit shouldn't have the warning in their build. I implemented 3 fixes for this. Pick your preferred one, or propose another and I'll implement it.