summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-10-05 13:39:53 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2009-10-05 13:39:53 -0700
commit81a63ac0886a31a566535a3483e5013f5bc0b424 (patch)
tree1bb0319755a5e26e0bc7f9f20632ae8f31538971 /indra/llrender
parent0f5bbec3747f3ff2b1d580506d35dc080fcd1a98 (diff)
parent9818f158366a0df980a2e4b9251177d9a9209cfb (diff)
merge with latest from lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp3
-rw-r--r--indra/llrender/llfontgl.h9
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