(Windows) Fixed some MSVC compiler warnings

This commit is contained in:
Leon Styhre 2024-08-20 17:17:33 +02:00
parent 3f2f8f9b57
commit 3a5c4a7605

View file

@ -325,11 +325,11 @@ void TextEditComponent::setCursor(size_t pos)
{
if (pos == std::string::npos) {
mCursor = static_cast<unsigned int>(mText.length());
mCursorShapedText = Utils::String::unicodeLength(mText);
mCursorShapedText = static_cast<int>(Utils::String::unicodeLength(mText));
}
else {
mCursor = static_cast<int>(pos);
mCursorShapedText = Utils::String::unicodeLength(mText.substr(0, pos));
mCursorShapedText = static_cast<int>(Utils::String::unicodeLength(mText.substr(0, pos)));
}
moveCursor(0);