diff options
author | richard <none@none> | 2009-10-30 18:24:42 -0700 |
---|---|---|
committer | richard <none@none> | 2009-10-30 18:24:42 -0700 |
commit | d8d678307c1831ee5f8580c709c4430e2ce7fd8d (patch) | |
tree | 09aa15753fb0a02a4a96d91504995b1dc24d7b70 /indra/llui/llui.h | |
parent | 2fadd99877eceb55077957b5bab6353611184c86 (diff) | |
parent | c964f281906e760c88c4f01edc566df35291ddff (diff) |
merge
Diffstat (limited to 'indra/llui/llui.h')
-rw-r--r-- | indra/llui/llui.h | 14 |
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*> |