diff options
Diffstat (limited to 'indra/llui/llkeywords.cpp')
-rw-r--r-- | indra/llui/llkeywords.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index ea84594ad6..cc567adb75 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -501,7 +501,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW { if( *cur == '\n' ) { - LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, cur-base); + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, (S32)(cur - base)); text_segment->setToken( 0 ); insertSegment( *seg_list, text_segment, text_len, style, editor); cur++; @@ -532,13 +532,13 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW LLKeywordToken* cur_token = *iter; if( cur_token->isHead( cur ) ) { - S32 seg_start = cur - base; + S32 seg_start = (S32)(cur - base); while( *cur && *cur != '\n' ) { // skip the rest of the line cur++; } - S32 seg_end = cur - base; + S32 seg_end = (S32)(cur - base); //create segments from seg_start to seg_end insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor); @@ -582,7 +582,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW S32 between_delimiters = 0; S32 seg_end = 0; - seg_start = cur - base; + seg_start = (S32)(cur - base); cur += cur_delimiter->getLengthHead(); LLKeywordToken::ETokenType type = cur_delimiter->getType(); @@ -669,7 +669,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW { p++; } - S32 seg_len = p - cur; + S32 seg_len = (S32)(p - cur); if( seg_len > 0 ) { WStringMapIndex word( cur, seg_len ); @@ -677,7 +677,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW if( map_iter != mWordTokenMap.end() ) { LLKeywordToken* cur_token = map_iter->second; - S32 seg_start = cur - base; + S32 seg_start = (S32)(cur - base); S32 seg_end = seg_start + seg_len; // LL_INFOS("SyntaxLSL") << "Seg: [" << word.c_str() << "]" << LL_ENDL; |