diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-02 17:16:03 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-02 17:16:03 +0200 |
commit | 28c0bcf7e608db5bd5c3811906be03f1457dd45d (patch) | |
tree | 5ac94e9dd3d46ee2db797dd43acfcc098427bf5b /indra/llui/llui.h | |
parent | d3d53c9e41f6de250e7bd059d4120b9be08d31da (diff) | |
parent | d8b3e7a021b97bf3cb4494c4d9228ed0a3c16738 (diff) |
Merge from default branch
--HG--
branch : product-engine
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*> |