From 2a2be51b8fda4ca2595203c07ce625ddaa68012c Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Thu, 15 Mar 2012 19:44:36 +0100 Subject: [PATCH] scenery: move static ReaderWriter proxies around. Not yet sure where they end, but make sure they are currently pulled. ... now watching jenkins. --- simgear/scene/tgdb/TileEntry.cxx | 13 +------------ simgear/scene/tgdb/userdata.cxx | 12 +++++++++++- 2 files changed, 12 insertions(+), 13 deletions(-) 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; -- 2.39.2