Bläddra i källkod

FBX-Importer: remove unused lookup tables for nodes.

Kim Kulling 7 år sedan
förälder
incheckning
c9bb3592ff
2 ändrade filer med 1 tillägg och 23 borttagningar
  1. 1 19
      code/FBXConverter.cpp
  2. 0 4
      code/FBXConverter.h

+ 1 - 19
code/FBXConverter.cpp

@@ -2037,34 +2037,16 @@ void Converter::ConvertAnimations()
     }
 }
 
-std::string Converter::FixNodeName( const std::string& name )
-{
+std::string Converter::FixNodeName( const std::string& name ) {
     // strip Model:: prefix, avoiding ambiguities (i.e. don't strip if
     // this causes ambiguities, well possible between empty identifiers,
     // such as "Model::" and ""). Make sure the behaviour is consistent
     // across multiple calls to FixNodeName().
     if ( name.substr( 0, 7 ) == "Model::" ) {
         std::string temp = name.substr( 7 );
-
-        const NodeNameMap::const_iterator it = node_names.find( temp );
-        if ( it != node_names.end() ) {
-            if ( !( *it ).second ) {
-                return FixNodeName( name + "_" );
-            }
-        }
-        node_names[ temp ] = true;
-
         return temp;
     }
 
-    const NodeNameMap::const_iterator it = node_names.find( name );
-    if ( it != node_names.end() ) {
-        if ( ( *it ).second ) {
-            return FixNodeName( name + "_" );
-        }
-    }
-    node_names[ name ] = false;
-
     return name;
 }
 

+ 0 - 4
code/FBXConverter.h

@@ -424,10 +424,6 @@ private:
     typedef std::map<std::string, unsigned int> NodeAnimBitMap;
     NodeAnimBitMap node_anim_chain_bits;
 
-    // name -> has had its prefix_stripped?
-    typedef std::map<std::string, bool> NodeNameMap;
-    NodeNameMap node_names;
-
     NodeNameCache mNodeNames;
     double anim_fps;