diff options
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index b4254524ad..dc3026e14d 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -98,13 +98,13 @@ public: } virtual S32 undo( LLTextBase* editor ) { - remove(editor, getPosition(), mWString.length() ); + remove(editor, getPosition(), static_cast<S32>(mWString.length())); return getPosition(); } virtual S32 redo( LLTextBase* editor ) { - insert(editor, getPosition(), mWString ); - return getPosition() + mWString.length(); + insert(editor, getPosition(), mWString); + return getPosition() + static_cast<S32>(mWString.length()); } private: @@ -151,13 +151,13 @@ public: } virtual S32 undo( LLTextBase* editor ) { - remove(editor, getPosition(), mWString.length() ); + remove(editor, getPosition(), static_cast<S32>(mWString.length())); return getPosition(); } virtual S32 redo( LLTextBase* editor ) { - insert(editor, getPosition(), mWString ); - return getPosition() + mWString.length(); + insert(editor, getPosition(), mWString); + return getPosition() + static_cast<S32>(mWString.length()); } private: @@ -216,7 +216,7 @@ public: virtual S32 undo( LLTextBase* editor ) { insert(editor, getPosition(), mWString); - return getPosition() + mWString.length(); + return getPosition() + static_cast<S32>(mWString.length()); } virtual S32 redo( LLTextBase* editor ) { @@ -365,16 +365,16 @@ void LLTextEditor::selectNext(const std::string& search_text_in, bool case_insen if (selected_text == search_text) { // We already have this word selected, we are searching for the next. - setCursorPos(mCursorPos + search_text.size()); + setCursorPos(mCursorPos + static_cast<S32>(search_text.size())); } } - S32 loc = text.find(search_text,mCursorPos); + S32 loc = static_cast<S32>(text.find(search_text,mCursorPos)); // If Maybe we wrapped, search again if (wrap && (-1 == loc)) { - loc = text.find(search_text); + loc = static_cast<S32>(text.find(search_text)); } // If still -1, then search_text just isn't found. @@ -1578,8 +1578,8 @@ void LLTextEditor::cleanStringForPaste(LLWString & clean_string) if( mAllowEmbeddedItems ) { const llwchar LF = 10; - S32 len = clean_string.length(); - for( S32 i = 0; i < len; i++ ) + auto len = clean_string.length(); + for( size_t i = 0; i < len; i++ ) { llwchar wc = clean_string[i]; if( (wc < LLFontFreetype::FIRST_CHAR) && (wc != LF) ) @@ -2489,7 +2489,7 @@ void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const LLWString widget_wide_text = utf8str_to_wstring(text); - LLTextSegmentPtr segment = new LLInlineViewSegment(params, old_length, old_length + widget_wide_text.size()); + LLTextSegmentPtr segment = new LLInlineViewSegment(params, old_length, old_length + static_cast<S32>(widget_wide_text.size())); insert(getLength(), widget_wide_text, false, segment); // Set the cursor and scroll position @@ -2843,7 +2843,7 @@ void LLTextEditor::updatePreedit(const LLWString &preedit_string, if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) { mPreeditOverwrittenWString = getWText().substr(insert_preedit_at, mPreeditWString.length()); - removeStringNoUndo(insert_preedit_at, mPreeditWString.length()); + removeStringNoUndo(insert_preedit_at, static_cast<S32>(mPreeditWString.length())); } else { |