From 56715de2cfc326da3e28d9ae70ba6288db50f7ac Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 4 Jul 2019 18:07:46 +0300 Subject: DRTVWR-493 LLUrlWhiteList to LLSingleton --- indra/newview/llurlwhitelist.cpp | 25 ------------------------- indra/newview/llurlwhitelist.h | 13 +++---------- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index 3a7285974e..b4d38f5d1e 100644 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -31,8 +31,6 @@ #include #include -LLUrlWhiteList* LLUrlWhiteList::sInstance = 0; - /////////////////////////////////////////////////////////////////////////////// // LLUrlWhiteList::LLUrlWhiteList () : @@ -49,29 +47,6 @@ LLUrlWhiteList::~LLUrlWhiteList () { } -/////////////////////////////////////////////////////////////////////////////// - -//static -void LLUrlWhiteList::initClass () -{ - if ( ! sInstance ) - { - sInstance = new LLUrlWhiteList (); - } -} - -//static -void LLUrlWhiteList::cleanupClass () -{ - delete sInstance; - sInstance = NULL; -} - -LLUrlWhiteList* LLUrlWhiteList::getInstance () -{ - return sInstance; -} - /////////////////////////////////////////////////////////////////////////////// // bool LLUrlWhiteList::load () diff --git a/indra/newview/llurlwhitelist.h b/indra/newview/llurlwhitelist.h index b0969051a7..c2511b08fd 100644 --- a/indra/newview/llurlwhitelist.h +++ b/indra/newview/llurlwhitelist.h @@ -30,15 +30,11 @@ #include -class LLUrlWhiteList +class LLUrlWhiteList : public LLSingleton { + LLSINGLETON(LLUrlWhiteList); + ~LLUrlWhiteList(); public: - virtual ~LLUrlWhiteList (); - - static void initClass(); - static void cleanupClass(); - static LLUrlWhiteList* getInstance (); - bool load (); bool save (); @@ -51,9 +47,6 @@ class LLUrlWhiteList bool getNext ( std::string& valueOut ); private: - LLUrlWhiteList (); - static LLUrlWhiteList* sInstance; - typedef std::vector < std::string > string_list_t ; bool mLoaded; -- cgit v1.2.3