summaryrefslogtreecommitdiff
path: root/indra/llui/llui.h
diff options
context:
space:
mode:
authorrichard <none@none>2009-10-30 18:24:42 -0700
committerrichard <none@none>2009-10-30 18:24:42 -0700
commitd8d678307c1831ee5f8580c709c4430e2ce7fd8d (patch)
tree09aa15753fb0a02a4a96d91504995b1dc24d7b70 /indra/llui/llui.h
parent2fadd99877eceb55077957b5bab6353611184c86 (diff)
parentc964f281906e760c88c4f01edc566df35291ddff (diff)
merge
Diffstat (limited to 'indra/llui/llui.h')
-rw-r--r--indra/llui/llui.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index efb1b0a36f..5ec07f1941 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -404,6 +404,20 @@ namespace LLInitParam
LLUIColor getValueFromBlock() const;
};
+ // provide a better default for Optional<const LLFontGL*> than NULL
+ template <>
+ struct DefaultInitializer<const LLFontGL*>
+ {
+ // return reference to a single default instance of T
+ // built-in types will be initialized to zero, default constructor otherwise
+ static const LLFontGL* get()
+ {
+ static const LLFontGL* sDefaultFont = LLFontGL::getFontDefault();
+ return sDefaultFont;
+ }
+ };
+
+
template<>
class TypedParam<const LLFontGL*>
: public BlockValue<const LLFontGL*>