Skip to content

Commit

Permalink
simUtil: remove unnecessary map setProfile for config.txt loading (SI…
Browse files Browse the repository at this point in the history
…M-11196)

 Release Note: N/A

 Notes:

 Test Environment: Windows 10, VC14, Debug, 64-bit.

 Test: tss: fixes artifacts with no apparent changes to map

 Review: 20957
  • Loading branch information
Frank Bausch committed Mar 11, 2020
1 parent 2b7818a commit 410c619
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
10 changes: 1 addition & 9 deletions SDK/simUtil/DbConfigurationFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ osgEarth::Map* DbConfigurationFile::loadLegacyConfigFile(const std::string& file
gotValidFirstLine = true;
if (!map)
{
map = DbConfigurationFile::createDefaultMap_();
map = new osgEarth::Map();
map->beginUpdate();
}

Expand Down Expand Up @@ -499,14 +499,6 @@ std::string DbConfigurationFile::findTokenValue_(const std::vector<std::string>&
return std::string();
}

osgEarth::Map* DbConfigurationFile::createDefaultMap_()
{
// configure an EGM96 MSL globe.for the Map
osgEarth::Map* map = new osgEarth::Map();
map->setProfile(osgEarth::Profile::create("wgs84", "egm96"));
return map;
}

osg::Node* DbConfigurationFile::readEarthFile(std::istream& istream, const std::string& relativeTo)
{
osg::ref_ptr<osgDB::ReaderWriter> readWrite = osgDB::Registry::instance()->getReaderWriterForExtension("earth");
Expand Down
7 changes: 0 additions & 7 deletions SDK/simUtil/DbConfigurationFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ class SDKUTIL_EXPORT DbConfigurationFile
static std::string findTokenValue_(const std::vector<std::string>& tokens, const std::string& keyword);
/// convert QuadSphere levels to osgEarth levels
static unsigned int getOsgEarthLevel_(unsigned int QSlevel);

/**
* Creates a default osgEarth::Map object with the EGM96 MSL globe
* Loads parts of a legacy .txt configuration file (typically consisting of .db files)
* @return the osgEarth::Map created
*/
static osgEarth::Map* createDefaultMap_();
};

}
Expand Down

0 comments on commit 410c619

Please sign in to comment.