diff --git a/src/osgPlugins/terrain/ReaderWriterOsgTerrain.cpp b/src/osgPlugins/terrain/ReaderWriterOsgTerrain.cpp index ce83dc1d9..a41799d54 100644 --- a/src/osgPlugins/terrain/ReaderWriterOsgTerrain.cpp +++ b/src/osgPlugins/terrain/ReaderWriterOsgTerrain.cpp @@ -31,20 +31,8 @@ class ReaderWriterTerrain : public osgDB::ReaderWriter if (osgDB::equalCaseInsensitive(ext,"terrain")) { -#if 0 - KeywordValueMap keywordValueMap; - parseTerrainString(osgDB::getNameLessExtension(file), keywordValueMap); - - for(KeywordValueMap::iterator itr = keywordValueMap.begin(); - itr != keywordValueMap.end(); - ++itr) - { - OSG_NOTICE<<"["<first<<"] = "<<"["<second<<"]"< KeywordValueMap; - bool parseTerrainString(const std::string& str, KeywordValueMap& keywordValueMap) const - { - bool success = false; - - std::string::size_type pos = 0; - while(pos != std::string::npos) - { - pos = str.find_first_not_of(' ',pos); - if (pos == std::string::npos) break; - - std::string::size_type semicolon = str.find_first_of(';', pos); - std::string::size_type startstatement = pos; - std::string::size_type endstatement = std::string::npos; - if (semicolon!=std::string::npos) - { - endstatement = semicolon-1; - pos = semicolon+1; - } - else - { - endstatement = str.length()-1; - pos = std::string::npos; - } - - if (startstatementendstatement) - { - assignment = std::string::npos; - } - - std::string::size_type startvariable = startstatement; - std::string::size_type endvariable = startstatement; - std::string::size_type startvalue = startstatement; - std::string::size_type endvalue = endstatement; - - if (assignment!=std::string::npos) - { - endvariable = assignment-1; - startvalue = assignment+1; - - if (startvariable<=endvariable) - { - endvariable = str.find_last_not_of(' ',endvariable); - } - - if (startvariable<=endvariable) - { - ++endvariable; - } - } - - - if (startvalue<=endvalue) - { - startvalue = str.find_first_not_of(' ',startvalue); - } - - if (startvalue<=endvalue) - { - if (startvariable