From: Mathias Froehlich Date: Thu, 15 Mar 2012 18:44:36 +0000 (+0100) Subject: scenery: move static ReaderWriter proxies around. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2a2be51b8fda4ca2595203c07ce625ddaa68012c;p=simgear.git scenery: move static ReaderWriter proxies around. Not yet sure where they end, but make sure they are currently pulled. ... now watching jenkins. --- diff --git a/simgear/scene/tgdb/TileEntry.cxx b/simgear/scene/tgdb/TileEntry.cxx index e292b55e..fffb7f9a 100644 --- a/simgear/scene/tgdb/TileEntry.cxx +++ b/simgear/scene/tgdb/TileEntry.cxx @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -46,14 +47,11 @@ #include #include #include -#include #include #include #include #include -#include "ReaderWriterSPT.hxx" -#include "ReaderWriterSTG.hxx" #include "SGOceanTile.hxx" #include "TileEntry.hxx" @@ -62,15 +60,6 @@ using namespace simgear; static ModelLoadHelper *_modelLoader=0; -namespace { -osgDB::RegisterReaderWriterProxy g_readerWriterSTGProxy; -ModelRegistryCallbackProxy g_stgCallbackProxy("stg"); - -osgDB::RegisterReaderWriterProxy g_readerWriterSPTProxy; -ModelRegistryCallbackProxy g_sptCallbackProxy("spt"); -} - - static SGBucket getBucketFromFileName(const std::string& fileName) { std::istringstream ss(osgDB::getNameLessExtension(fileName)); diff --git a/simgear/scene/tgdb/userdata.cxx b/simgear/scene/tgdb/userdata.cxx index 61c46b1e..2482f033 100644 --- a/simgear/scene/tgdb/userdata.cxx +++ b/simgear/scene/tgdb/userdata.cxx @@ -32,10 +32,12 @@ #include #include #include +#include -#include "SGModelBin.hxx" #include "userdata.hxx" #include "SGReaderWriterBTG.hxx" +#include "ReaderWriterSPT.hxx" +#include "ReaderWriterSTG.hxx" // the following are static values needed by the runtime object // loader. However, the loading is done via a call back so these @@ -52,8 +54,16 @@ static SGPropertyNode *root_props = NULL; // none of the other object files in this library would be included in // the executable! Sticking the static proxy here forces the BTG code // to be sucked in. +namespace { osgDB::RegisterReaderWriterProxy g_readerWriter_BTG_Proxy; +osgDB::RegisterReaderWriterProxy g_readerWriterSTGProxy; +simgear::ModelRegistryCallbackProxy g_stgCallbackProxy("stg"); + +osgDB::RegisterReaderWriterProxy g_readerWriterSPTProxy; +simgear::ModelRegistryCallbackProxy g_sptCallbackProxy("spt"); +} + void sgUserDataInit( SGPropertyNode *p ) { _inited = true; root_props = p;