diff runner/FeatureExtractionManager.cpp @ 58:350f61d5d9be

Small simplification
author Chris Cannam
date Mon, 09 Jan 2012 14:55:17 +0000
parents 513230b19248
children 03b1d83fca29
line wrap: on
line diff
--- a/runner/FeatureExtractionManager.cpp	Mon Jan 09 14:47:50 2012 +0000
+++ b/runner/FeatureExtractionManager.cpp	Mon Jan 09 14:55:17 2012 +0000
@@ -773,18 +773,16 @@
 
     // Thanks to Matthias for this.
 
-    // Not the same as PluginMap::value_type (which has const key)
-    typedef pair<PluginMap::key_type, PluginMap::mapped_type> PluginMapEntry;
-    typedef map<Transform, PluginMapEntry> TransformOrderedPluginMap;
-    TransformOrderedPluginMap orderedPlugins;
+    typedef map<Transform, PluginMap::value_type> OrderedPluginMap;
+    OrderedPluginMap orderedPlugins;
 
     for (PluginMap::iterator pi = m_plugins.begin();
          pi != m_plugins.end(); ++pi) { 
         Transform firstForPlugin = (pi->second).begin()->first;
-        orderedPlugins[firstForPlugin] = PluginMapEntry(pi->first, pi->second);
+        orderedPlugins.insert(OrderedPluginMap::value_type(firstForPlugin, *pi));
     }
 
-    for (TransformOrderedPluginMap::iterator superPi = orderedPlugins.begin();
+    for (OrderedPluginMap::iterator superPi = orderedPlugins.begin();
          superPi != orderedPlugins.end(); ++superPi) {
 
         // The value we extract from this map is just the same as the
@@ -792,7 +790,7 @@
         // directly -- but we happen to get them in the right order
         // now because the map iterator is ordered by the Transform
         // key type ordering
-        PluginMapEntry pi = superPi->second;
+        PluginMap::value_type pi = superPi->second;
 
         Plugin *plugin = pi.first;
         Plugin::FeatureSet featureSet = plugin->getRemainingFeatures();