diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-12 23:02:29 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-12 23:04:11 +0300 |
commit | c3d8b06f0058d808aa62c27d06f77e2a25747dd2 (patch) | |
tree | 3913aacee0a0aba39efd08ceb2dd82c1a9d81863 /basic/source/classes/sbintern.cxx | |
parent | Should initialise Module::mpModule to 0 (diff) | |
download | core-c3d8b06f0058d808aa62c27d06f77e2a25747dd2.tar.gz core-c3d8b06f0058d808aa62c27d06f77e2a25747dd2.zip |
Get rid of SHL_SBC
GetAppData(SHL_SBC) was used only locally in the sb library so no need for
it. Just use a static pointer field.
Change-Id: I37c8429b6c9e521a00c52bb622f78bdc4afe345c
Diffstat (limited to 'basic/source/classes/sbintern.cxx')
-rw-r--r-- | basic/source/classes/sbintern.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/basic/source/classes/sbintern.cxx b/basic/source/classes/sbintern.cxx index fb3f802e6bbd..6b3fa495f47e 100644 --- a/basic/source/classes/sbintern.cxx +++ b/basic/source/classes/sbintern.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tools/shl.hxx> - #include "sbintern.hxx" #include "sbunoobj.hxx" #include "token.hxx" @@ -27,13 +25,13 @@ #include "codegen.hxx" #include <basic/basmgr.hxx> +SbiGlobals* SbiGlobals::pGlobals = 0; + SbiGlobals* GetSbData() { - SbiGlobals** pp = (SbiGlobals**) ::GetAppData( SHL_SBC ); - SbiGlobals* p = *pp; - if( !p ) - p = *pp = new SbiGlobals; - return p; + if( !SbiGlobals::pGlobals ) + SbiGlobals::pGlobals = new SbiGlobals; + return SbiGlobals::pGlobals; } SbiGlobals::SbiGlobals() |