diff options
| author | Monroe Linden <monroe@lindenlab.com> | 2009-10-05 15:50:24 -0700 |
|---|---|---|
| committer | Monroe Linden <monroe@lindenlab.com> | 2009-10-05 15:50:24 -0700 |
| commit | 39ee2367a7e771890017fc3d663780437ea69bb2 (patch) | |
| tree | b84c3ade59dba5ae032a3123afb9c3c5f78c9b68 /indra/llrender | |
| parent | 374deb8da13c63f80dc1b245488eb254eb86f5d2 (diff) | |
| parent | 6ef3f20933c5df684298bc1b8f338ce9dfd49070 (diff) | |
Merging due to changes since my last pull.
Diffstat (limited to 'indra/llrender')
| -rw-r--r-- | indra/llrender/llfontgl.cpp | 3 | ||||
| -rw-r--r-- | indra/llrender/llfontgl.h | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index d76b23248d..8f943182b8 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -484,7 +484,8 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch S32 start_of_last_word = 0; BOOL in_word = FALSE; - F32 scaled_max_pixels = (F32)llceil(max_pixels * sScaleX); + // avoid S32 overflow when max_pixels == S32_MAX by staying in floating point + F32 scaled_max_pixels = ceil(max_pixels * sScaleX); S32 i; for (i=0; (i < max_chars); i++) diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index af8e0909af..ad84b6d641 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -72,11 +72,10 @@ public: enum StyleFlags { // text style to render. May be combined (these are bit flags) - // TODO:: Maybe change the value to 0x01 << 0 for 1 0x01 << 1 for 2, 0x01 << 2 for 4 - NORMAL = 0, - BOLD = 1, - ITALIC = 2, - UNDERLINE = 4 + NORMAL = 0x00, + BOLD = 0x01, + ITALIC = 0x02, + UNDERLINE = 0x04 }; enum ShadowType |
