From d18c46bc15dc1f42c4119a3af9e5284335333475 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 22 Jan 2010 14:47:51 +0200 Subject: win build fixed --HG-- branch : product-engine --- indra/newview/lltransientdockablefloater.cpp | 3 ++- indra/newview/lltransientfloatermgr.cpp | 6 ++++++ indra/newview/lltransientfloatermgr.h | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp index b830498cb0..c9bfe178ce 100644 --- a/indra/newview/lltransientdockablefloater.cpp +++ b/indra/newview/lltransientdockablefloater.cpp @@ -39,9 +39,10 @@ LLTransientDockableFloater::LLTransientDockableFloater(LLDockControl* dockControl, bool uniqueDocking, const LLSD& key, const Params& params) : - LLDockableFloater(dockControl, uniqueDocking, key, params), LLTransientFloater(this) + LLDockableFloater(dockControl, uniqueDocking, key, params) { LLTransientFloaterMgr::getInstance()->registerTransientFloater(this); + LLTransientFloater::init(this); } LLTransientDockableFloater::~LLTransientDockableFloater() diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp index f474f47eb7..8f1a738453 100644 --- a/indra/newview/lltransientfloatermgr.cpp +++ b/indra/newview/lltransientfloatermgr.cpp @@ -139,3 +139,9 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y, } } +void LLTransientFloater::init(LLFloater* thiz) +{ + // used since LLTransientFloater(this) can't be used in descendant constructor parameter initialization. + mFloater = thiz; +} + diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h index 95eba666a0..aecc5a505d 100644 --- a/indra/newview/lltransientfloatermgr.h +++ b/indra/newview/lltransientfloatermgr.h @@ -75,8 +75,13 @@ private: */ class LLTransientFloater { +protected: + /** + * Class initialization method. + * Should be called from descendant constructor. + */ + void init(LLFloater* thiz); public: - LLTransientFloater(LLFloater* floater) : mFloater(floater) {} virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0; bool isTransientDocked() { return mFloater->isDocked(); }; void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); } -- cgit v1.2.3