[Orxonox-commit 1682] r6400 - in code/branches/presentation2/src: libraries/core libraries/core/input libraries/network libraries/network/packet libraries/tools libraries/util modules/overlays/hud modules/pong modules/questsystem orxonox/overlays orxonox/pickup

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Dec 22 22:05:39 CET 2009


Author: rgrieder
Date: 2009-12-22 22:05:38 +0100 (Tue, 22 Dec 2009)
New Revision: 6400

Modified:
   code/branches/presentation2/src/libraries/core/ArgumentCompletionFunctions.cc
   code/branches/presentation2/src/libraries/core/BaseObject.cc
   code/branches/presentation2/src/libraries/core/ClassTreeMask.cc
   code/branches/presentation2/src/libraries/core/CommandEvaluation.cc
   code/branches/presentation2/src/libraries/core/CommandExecutor.cc
   code/branches/presentation2/src/libraries/core/ConfigFileManager.cc
   code/branches/presentation2/src/libraries/core/Language.cc
   code/branches/presentation2/src/libraries/core/Loader.cc
   code/branches/presentation2/src/libraries/core/NamespaceNode.cc
   code/branches/presentation2/src/libraries/core/input/InputManager.cc
   code/branches/presentation2/src/libraries/network/GamestateClient.cc
   code/branches/presentation2/src/libraries/network/GamestateManager.cc
   code/branches/presentation2/src/libraries/network/TrafficControl.cc
   code/branches/presentation2/src/libraries/network/packet/ClassID.cc
   code/branches/presentation2/src/libraries/network/packet/Gamestate.cc
   code/branches/presentation2/src/libraries/tools/TextureGenerator.cc
   code/branches/presentation2/src/libraries/util/StringUtils.cc
   code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc
   code/branches/presentation2/src/modules/pong/PongAI.cc
   code/branches/presentation2/src/modules/questsystem/QuestGUI.cc
   code/branches/presentation2/src/modules/questsystem/QuestManager.cc
   code/branches/presentation2/src/orxonox/overlays/OrxonoxOverlay.cc
   code/branches/presentation2/src/orxonox/pickup/ModifierPickup.cc
   code/branches/presentation2/src/orxonox/pickup/PickupCollection.cc
Log:
Replaced (*it). with it-> where I could find it. Should increased code readability.

Modified: code/branches/presentation2/src/libraries/core/ArgumentCompletionFunctions.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/ArgumentCompletionFunctions.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/ArgumentCompletionFunctions.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -83,9 +83,9 @@
                 while (file != end)
                 {
                     if (boost::filesystem::is_directory(*file))
-                        dirlist.push_back(ArgumentCompletionListElement((*file).string() + '/', getLowercase((*file).string()) + '/', (*file).BOOST_LEAF_FUNCTION() + '/'));
+                        dirlist.push_back(ArgumentCompletionListElement(file->string() + '/', getLowercase(file->string()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
                     else
-                        filelist.push_back(ArgumentCompletionListElement((*file).string(), getLowercase((*file).string()), (*file).BOOST_LEAF_FUNCTION()));
+                        filelist.push_back(ArgumentCompletionListElement(file->string(), getLowercase(file->string()), file->BOOST_LEAF_FUNCTION()));
                     ++file;
                 }
             }

Modified: code/branches/presentation2/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/BaseObject.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/BaseObject.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -290,7 +290,7 @@
     {
         std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(name);
         if (it != this->eventStates_.end())
-            return ((*it).second);
+            return (it->second);
         else
             return 0;
     }

Modified: code/branches/presentation2/src/libraries/core/ClassTreeMask.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/ClassTreeMask.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/ClassTreeMask.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -849,12 +849,12 @@
 
         // If there is a first subclass, move the object-iterator to the first object of this class. Else go to the end
         if (this->subclassIterator_ != this->subclasses_.end())
-            this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();
+            this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
         else
             this->objectIterator_ = ObjectList<BaseObject>::end();
 
         // Check if the iterator points on a valid object. If not, go to the next object by calling ++
-        if (!this->objectIterator_ || ((*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first)))
+        if (!this->objectIterator_ || (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first)))
             this->operator++();
 
         return (*this);
@@ -881,13 +881,13 @@
 
                     // Check if there really is a next class. If yes, move the object-iterator to the first object
                     if (this->subclassIterator_ != this->subclasses_.end())
-                        this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();
+                        this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
                     else
                         return (*this);
                 }
 
             // Repeat this until we reach a valid object or the end
-            } while ((*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first));
+            } while (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first));
         }
         return (*this);
     }

Modified: code/branches/presentation2/src/libraries/core/CommandEvaluation.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/CommandEvaluation.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/CommandEvaluation.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -280,7 +280,7 @@
             if (it != list.begin())
                 output += ' ';
 
-            output += (*it).getDisplay();
+            output += it->getDisplay();
         }
         return output;
     }

Modified: code/branches/presentation2/src/libraries/core/CommandExecutor.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/CommandExecutor.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/CommandExecutor.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -81,7 +81,7 @@
     {
         std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_.find(name);
         if (it != CommandExecutor::getInstance().consoleCommandShortcuts_.end())
-            return (*it).second;
+            return it->second;
         else
             return 0;
     }
@@ -95,7 +95,7 @@
     {
         std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_LC_.find(name);
         if (it != CommandExecutor::getInstance().consoleCommandShortcuts_LC_.end())
-            return (*it).second;
+            return it->second;
         else
             return 0;
     }
@@ -385,8 +385,8 @@
                 if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1)
                 {
                     // There is exactly one possible argument
-                    CommandExecutor::getEvaluation().argument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
-                    CommandExecutor::getEvaluation().possibleArgument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
+                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()->getString();
+                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()->getString();
                     CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
                     return;
                 }
@@ -470,7 +470,7 @@
         for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseStringIdentifierMapBegin(); it != Identifier::getLowercaseStringIdentifierMapEnd(); ++it)
             if (it->second->hasConsoleCommands())
                 if (it->first.find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
+                    CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
     }
 
     void CommandExecutor::createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier)
@@ -481,13 +481,13 @@
         {
             for (std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMapBegin(); it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd(); ++it)
                 if (it->first.find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
+                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
         }
         else
         {
             for (std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMapBegin(); it != identifier->getLowercaseConsoleCommandMapEnd(); ++it)
                 if (it->first.find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
+                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
         }
     }
 
@@ -516,8 +516,8 @@
     {
         const std::string& lowercase = getLowercase(name);
         std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseStringIdentifierMap().find(lowercase);
-        if ((it != Identifier::getLowercaseStringIdentifierMapEnd()) && (*it).second->hasConsoleCommands())
-            return (*it).second;
+        if ((it != Identifier::getLowercaseStringIdentifierMapEnd()) && it->second->hasConsoleCommands())
+            return it->second;
 
         return 0;
     }
@@ -529,13 +529,13 @@
         {
             std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMap().find(lowercase);
             if (it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd())
-                return (*it).second;
+                return it->second;
         }
         else
         {
             std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMap().find(lowercase);
             if (it != identifier->getLowercaseConsoleCommandMapEnd())
-                return (*it).second;
+                return it->second;
         }
         return 0;
     }
@@ -598,15 +598,15 @@
                 char temp = 0;
                 for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
                 {
-                    if ((*(*it).first).size() > i)
+                    if (it->first->size() > i)
                     {
                         if (it == list.begin())
                         {
-                            temp = (*(*it).first)[i];
+                            temp = (*it->first)[i];
                         }
                         else
                         {
-                            if (temp != (*(*it).first)[i])
+                            if (temp != (*it->first)[i])
                                 return output;
                         }
                     }

Modified: code/branches/presentation2/src/libraries/core/ConfigFileManager.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/ConfigFileManager.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/ConfigFileManager.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -50,9 +50,9 @@
         std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
         if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
         {
-            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
-            if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
-                return (*variable).second->set(value);
+            std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
+            if (variable != identifier->second->getLowercaseConfigValueMapEnd())
+                return variable->second->set(value);
         }
         return false;
     }
@@ -67,9 +67,9 @@
         std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
         if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
         {
-            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
-            if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
-                return (*variable).second->tset(value);
+            std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
+            if (variable != identifier->second->getLowercaseConfigValueMapEnd())
+                return variable->second->tset(value);
         }
         return false;
     }
@@ -381,15 +381,15 @@
         for (std::list<ConfigFileSection*>::iterator it1 = this->sections_.begin(); it1 != this->sections_.end(); )
         {
             std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName());
-            if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues())
+            if (it2 != Identifier::getStringIdentifierMapEnd() && it2->second->hasConfigValues())
             {
                 // The section exists, delete comment
                 if (bCleanComments)
                     (*it1)->setComment("");
                 for (std::list<ConfigFileEntry*>::iterator it3 = (*it1)->entries_.begin(); it3 != (*it1)->entries_.end(); )
                 {
-                    std::map<std::string, ConfigValueContainer*>::const_iterator it4 = (*it2).second->getConfigValueMap().find((*it3)->getName());
-                    if (it4 != (*it2).second->getConfigValueMapEnd())
+                    std::map<std::string, ConfigValueContainer*>::const_iterator it4 = it2->second->getConfigValueMap().find((*it3)->getName());
+                    if (it4 != it2->second->getConfigValueMapEnd())
                     {
                         // The config-value exists, delete comment
                         if (bCleanComments)
@@ -463,7 +463,7 @@
             {
                 if (it->second->hasConfigValues())
                 {
-                    for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = (*it).second->getConfigValueMapBegin(); it2 != (*it).second->getConfigValueMapEnd(); ++it2)
+                    for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = it->second->getConfigValueMapBegin(); it2 != it->second->getConfigValueMapEnd(); ++it2)
                         it2->second->update();
 
                     it->second->updateConfigValues();

Modified: code/branches/presentation2/src/libraries/core/Language.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Language.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/Language.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -317,7 +317,7 @@
         // Iterate through the list an write the lines into the file
         for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
         {
-            file << (*it).second->getLabel() << '=' << (*it).second->getDefault() << std::endl;
+            file << it->second->getLabel() << '=' << it->second->getDefault() << std::endl;
         }
 
         file.close();

Modified: code/branches/presentation2/src/libraries/core/Loader.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Loader.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/Loader.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -79,7 +79,7 @@
             return;
         for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
         {
-            if ((*it).first == file)
+            if (it->first == file)
             {
                 Loader::files_s.erase(it);
                 break;
@@ -91,7 +91,7 @@
     {
         bool success = true;
         for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
-            if (!Loader::load((*it).first, (*it).second * mask))
+            if (!Loader::load(it->first, it->second * mask))
                 success = false;
 
         return success;
@@ -290,7 +290,7 @@
             do
             {
                 if (it != luaTags.end())
-                    end = (*(it++)).first;
+                    end = (it++)->first;
                 else
                     end = std::string::npos;
 

Modified: code/branches/presentation2/src/libraries/core/NamespaceNode.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/NamespaceNode.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/NamespaceNode.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -42,7 +42,7 @@
     NamespaceNode::~NamespaceNode()
     {
         for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
-            delete ((*(it++)).second);
+            delete (it++)->second;
     }
 
     std::set<NamespaceNode*> NamespaceNode::getNodeRelative(const std::string& name)
@@ -88,14 +88,14 @@
                 if (it == this->subnodes_.end())
                     it = this->subnodes_.insert(this->subnodes_.begin(), std::pair<std::string, NamespaceNode*>(firstPart, new NamespaceNode(firstPart, this)));
 
-                if ((*it).second->isHidden())
+                if (it->second->isHidden())
                 {
                     COUT(2) << "Warning: Subnamespace '" << firstPart << "' in namespace '" << this->name_ << "' is hidden and can't be accessed." << std::endl;
                     nodes.insert(this);
                 }
                 else
                 {
-                    nodes = (*it).second->getNodeRelative(secondPart);
+                    nodes = it->second->getNodeRelative(secondPart);
                 }
             }
             else
@@ -104,9 +104,9 @@
 
                 for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
                 {
-                    if ((*it).first.find(firstPart) == ((*it).first.size() - firstPart.size()))
+                    if (it->first.find(firstPart) == (it->first.size() - firstPart.size()))
                     {
-                        std::set<NamespaceNode*> temp2 = (*it).second->getNodeRelative(secondPart);
+                        std::set<NamespaceNode*> temp2 = it->second->getNodeRelative(secondPart);
                         nodes.insert(temp2.begin(), temp2.end());
                         bFoundMatchingNamespace = true;
                     }
@@ -132,7 +132,7 @@
         else
         {
             for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                if ((*it).second->includes(ns))
+                if (it->second->includes(ns))
                     return true;
         }
 

Modified: code/branches/presentation2/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/input/InputManager.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/core/input/InputManager.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -274,7 +274,7 @@
 
         // destroy all user InputStates
         while (statesByName_.size() > 0)
-            this->destroyStateInternal((*statesByName_.rbegin()).second);
+            this->destroyStateInternal(statesByName_.rbegin()->second);
 
         if (!(internalState_ & Bad))
             this->destroyDevices();

Modified: code/branches/presentation2/src/libraries/network/GamestateClient.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/GamestateClient.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/network/GamestateClient.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -53,7 +53,7 @@
   GamestateClient::~GamestateClient() {
       std::map<unsigned int, packet::Gamestate *>::iterator it;
       for ( it = this->gamestateMap_.begin(); it != this->gamestateMap_.end(); ++it )
-          delete (*it).second;
+          delete it->second;
       if( this->tempGamestate_ )
           delete this->tempGamestate_;
   }
@@ -125,7 +125,7 @@
       if(it->first>=last_diff_)
         break;
       // otherwise delete that stuff
-      delete (*it).second;
+      delete it->second;
       temp=it++;
       gamestateMap_.erase(temp);
     }

Modified: code/branches/presentation2/src/libraries/network/GamestateManager.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/GamestateManager.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/network/GamestateManager.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -68,13 +68,13 @@
     if( this->reference )
         delete this->reference;std::map<unsigned int, packet::Gamestate*>::iterator it;
     for( it = gamestateQueue.begin(); it != gamestateQueue.end(); ++it )
-      delete (*it).second;
+      delete it->second;
     std::map<unsigned int, std::map<unsigned int, packet::Gamestate*> >::iterator it1;
     std::map<unsigned int, packet::Gamestate*>::iterator it2;
     for( it1 = gamestateMap_.begin(); it1 != gamestateMap_.end(); ++it1 )
     {
       for( it2 = it1->second.begin(); it2 != it1->second.end(); ++it2 )
-        delete (*it2).second;
+        delete it2->second;
     }
     this->trafficControl_->destroy();
 //     delete this->threadMutex_;

Modified: code/branches/presentation2/src/libraries/network/TrafficControl.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/TrafficControl.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/network/TrafficControl.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -151,18 +151,18 @@
 
     for(itvec = objectListTemp[gamestateID].begin(); itvec != objectListTemp[gamestateID].end(); itvec++)
       {
-      if(objectListPerm.find((*itvec).objID) != objectListPerm.end()) // check whether the obj already exists in our lists
+      if(objectListPerm.find(itvec->objID) != objectListPerm.end()) // check whether the obj already exists in our lists
       {
-        objectListPerm[(*itvec).objID].objCurGS = gamestateID;
-        objectListPerm[(*itvec).objID].objValueSched = 0; //set scheduling value back
+        objectListPerm[itvec->objID].objCurGS = gamestateID;
+        objectListPerm[itvec->objID].objValueSched = 0; //set scheduling value back
       }
       else
       {
         assert(0);
-        objectListPerm[(*itvec).objID].objCurGS = gamestateID;
-        objectListPerm[(*itvec).objID].objID = (*itvec).objID;
-        objectListPerm[(*itvec).objID].objCreatorID = (*itvec).objCreatorID;
-        objectListPerm[(*itvec).objID].objSize = (*itvec).objSize;
+        objectListPerm[itvec->objID].objCurGS = gamestateID;
+        objectListPerm[itvec->objID].objID = itvec->objID;
+        objectListPerm[itvec->objID].objCreatorID = itvec->objCreatorID;
+        objectListPerm[itvec->objID].objSize = itvec->objSize;
       }
       }
        // remove temporary list (with acked objects) from the map
@@ -204,15 +204,15 @@
     assert(!list.empty());
     for(itvec = list.begin(); itvec != list.end();)
     {
-      assert( (*itvec).objSize < 1000);
-      if ( ( size + (*itvec).objSize ) < targetsize )
+      assert( itvec->objSize < 1000);
+      if ( ( size + itvec->objSize ) < targetsize )
       {
-        size += (*itvec).objSize;//objSize is given in bytes
+        size += itvec->objSize;//objSize is given in bytes
         ++itvec;
       }
       else
       {
-        clientListPerm_[currentClientID][(*itvec).objID].objValueSched += SCHED_PRIORITY_OFFSET; // NOTE: SCHED_PRIORITY_OFFSET is negative
+        clientListPerm_[currentClientID][itvec->objID].objValueSched += SCHED_PRIORITY_OFFSET; // NOTE: SCHED_PRIORITY_OFFSET is negative
         list.erase(itvec, list.end());
         break;
       }
@@ -240,11 +240,11 @@
 
       for( itvec=list.begin(); itvec != list.end(); itvec++)
       {
-        if ( objectListPerm.find( (*itvec).objID) != objectListPerm.end() )
+        if ( objectListPerm.find( itvec->objID) != objectListPerm.end() )
         {
         // we already have the object in our map
         //obj bleibt in liste und permanente prio wird berechnet
-          objectListPerm[(*itvec).objID].objDiffGS = currentGamestateID - objectListPerm[(*itvec).objID].objCurGS;
+          objectListPerm[itvec->objID].objDiffGS = currentGamestateID - objectListPerm[itvec->objID].objCurGS;
           continue;//check next objId
         }
         else
@@ -288,19 +288,19 @@
     std::list<obj>::iterator it;
     COUT(0) << "=========== Objectlist ===========" << endl;
     for( it=list.begin(); it!=list.end(); it++)
-      COUT(0) << "ObjectID: " << (*it).objID << " creatorID: " << (*it).objCreatorID << " Priority: " << clientListPerm_[clientID][(*it).objID].objValuePerm + clientListPerm_[clientID][(*it).objID].objValueSched << " size: " << (*it).objSize << endl;
+      COUT(0) << "ObjectID: " << it->objID << " creatorID: " << it->objCreatorID << " Priority: " << clientListPerm_[clientID][it->objID].objValuePerm + clientListPerm_[clientID][it->objID].objValueSched << " size: " << it->objSize << endl;
   }
 
   void TrafficControl::fixCreatorDependencies(std::list<obj>::iterator it1, std::list<obj>& list, unsigned int clientID)
   {
-    if ( (*it1).objCreatorID == OBJECTID_UNKNOWN )
+    if ( it1->objCreatorID == OBJECTID_UNKNOWN )
       return;
-    if( clientListPerm_[clientID][(*it1).objCreatorID].objCurGS != GAMESTATEID_INITIAL )
+    if( clientListPerm_[clientID][it1->objCreatorID].objCurGS != GAMESTATEID_INITIAL )
       return;
     std::list<obj>::iterator it2, it3=it1;
     for( it2 = ++it3; it2 != list.end(); it2++ )
     {
-      if( (*it2).objID == (*it1).objCreatorID )
+      if( it2->objID == it1->objCreatorID )
       {
         it3 = list.insert(it1, *it2); //insert creator before it1
         list.erase(it2);

Modified: code/branches/presentation2/src/libraries/network/packet/ClassID.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/packet/ClassID.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/network/packet/ClassID.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -56,7 +56,7 @@
   //calculate total needed size (for all strings and integers)
   std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin();
   for(;it != Identifier::getStringIdentifierMapEnd();++it){
-    id = (*it).second;
+    id = it->second;
     if(id == NULL || !id->hasFactory())
       continue;
     const std::string& classname = id->getName();

Modified: code/branches/presentation2/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/packet/Gamestate.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/network/packet/Gamestate.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -533,14 +533,14 @@
   for(it=dataVector_.begin(); it!=dataVector_.end();){
     SynchronisableHeader oldobjectheader(origdata);
     SynchronisableHeader newobjectheader(newdata);
-    if ( (*it).objSize == 0 )
+    if ( it->objSize == 0 )
     {
       ++it;
       continue;
     }
     objectsize = oldobjectheader.getDataSize();
     objectOffset=SynchronisableHeader::getSize(); //skip the size and the availableData variables in the objectheader
-    if ( (*it).objID == oldobjectheader.getObjectID() ){
+    if ( it->objID == oldobjectheader.getObjectID() ){
       memcpy(newdata, origdata, objectsize);
       assert(newobjectheader.isDataAvailable()==true);
       ++it;

Modified: code/branches/presentation2/src/libraries/tools/TextureGenerator.cc
===================================================================
--- code/branches/presentation2/src/libraries/tools/TextureGenerator.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/tools/TextureGenerator.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -81,7 +81,7 @@
         }
         else
         {
-            return (*it).second;
+            return it->second;
         }
     }
 }

Modified: code/branches/presentation2/src/libraries/util/StringUtils.cc
===================================================================
--- code/branches/presentation2/src/libraries/util/StringUtils.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/libraries/util/StringUtils.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -53,12 +53,12 @@
     void strip(std::string* str)
     {
         size_t pos;
-        while ((pos = (*str).find(' ')) < (*str).length())
-            (*str).erase(pos, 1);
-        while ((pos = (*str).find('\t')) < (*str).length())
-            (*str).erase(pos, 1);
-        while ((pos = (*str).find('\n')) < (*str).length())
-            (*str).erase(pos, 1);
+        while ((pos = str->find(' ')) < str->length())
+            str->erase(pos, 1);
+        while ((pos = str->find('\t')) < str->length())
+            str->erase(pos, 1);
+        while ((pos = str->find('\n')) < str->length())
+            str->erase(pos, 1);
     }
 
     /**

Modified: code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -121,15 +121,15 @@
             if (this->colours_.size() > 0)
             {
                 ColourValue colour1(0, 0, 0, 1);
-                ColourValue colour2 = (*this->colours_.rbegin()).second;
+                ColourValue colour2 = this->colours_.rbegin()->second;
                 float value1(0);
-                float value2 = (*this->colours_.rbegin()).first;
+                float value2 = this->colours_.rbegin()->first;
                 for (std::map<float, ColourValue>::reverse_iterator it = this->colours_.rbegin(); it != this->colours_.rend(); ++it)
                 {
                     colour1 = colour2;
                     value1 = value2;
-                    colour2 = (*it).second;
-                    value2 = (*it).first;
+                    colour2 = it->second;
+                    value2 = it->first;
 
                     if (value2 < this->value_)
                         break;

Modified: code/branches/presentation2/src/modules/pong/PongAI.cc
===================================================================
--- code/branches/presentation2/src/modules/pong/PongAI.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/modules/pong/PongAI.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -61,7 +61,7 @@
     PongAI::~PongAI()
     {
         for (std::list<std::pair<Timer*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
-            (*it).first->destroy();
+            it->first->destroy();
     }
 
     void PongAI::setConfigValues()

Modified: code/branches/presentation2/src/modules/questsystem/QuestGUI.cc
===================================================================
--- code/branches/presentation2/src/modules/questsystem/QuestGUI.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/modules/questsystem/QuestGUI.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -115,7 +115,7 @@
         std::map<std::string, Quest*> quests = QuestManager::getInstance().getQuests();
         for(std::map<std::string, Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
         {
-            Quest* quest = (*it).second;
+            Quest* quest = it->second;
             if(quest->getParentQuest() == NULL && !quest->isInactive(this->player_)) //!< If the Quest isn't inactive and a root Quest (meaning it has no parent.), create a Node.
             {
                 index = createNode(this->root_, quest, depth, index);
@@ -135,7 +135,7 @@
         //! Clear all nodes.
         for(std::map<CEGUI::Window*, QuestGUINode*>::iterator it = this->nodes_.begin(); it != this->nodes_.end(); it++)
         {
-            QuestGUINode* node = (*it).second;
+            QuestGUINode* node = it->second;
             if(node == NULL)
             {
                 COUT(1) << "Node is NULL!";
@@ -208,7 +208,7 @@
     {
         for(std::map<PlayerInfo*, QuestGUI*>::iterator it = QuestManager::getInstance().questGUIs_.begin(); it != QuestManager::getInstance().questGUIs_.end(); it++)
         {
-            QuestGUI* gui = (*it).second;
+            QuestGUI* gui = it->second;
             std::map<CEGUI::Window*, QuestGUINode*>::iterator node = gui->nodes_.find(window);
             if(node != gui->nodes_.end()) return node->second;
         }

Modified: code/branches/presentation2/src/modules/questsystem/QuestManager.cc
===================================================================
--- code/branches/presentation2/src/modules/questsystem/QuestManager.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/modules/questsystem/QuestManager.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -75,7 +75,7 @@
     {
         for(std::map<PlayerInfo*, QuestGUI*>::iterator it = this->questGUIs_.begin(); it != this->questGUIs_.end(); it++)
         {
-            (*it).second->destroy();
+            it->second->destroy();
         }
         this->questGUIs_.clear();
     }

Modified: code/branches/presentation2/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/presentation2/src/orxonox/overlays/OrxonoxOverlay.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/orxonox/overlays/OrxonoxOverlay.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -310,7 +310,7 @@
     {
         std::map<std::string, OrxonoxOverlay*>::const_iterator it = overlays_s.find(name);
         if (it != overlays_s.end())
-            (*it).second->scale(Vector2(scale, scale));
+            it->second->scale(Vector2(scale, scale));
     }
 
     /**
@@ -325,7 +325,7 @@
         std::map<std::string, OrxonoxOverlay*>::const_iterator it = overlays_s.find(name);
         if (it != overlays_s.end())
         {
-            OrxonoxOverlay* overlay= (*it).second;
+            OrxonoxOverlay* overlay= it->second;
             if(overlay->isVisible())
                 overlay->hide();
             else
@@ -344,7 +344,7 @@
     {
         std::map<std::string, OrxonoxOverlay*>::const_iterator it = overlays_s.find(name);
         if (it != overlays_s.end())
-            (*it).second->scroll(scroll);
+            it->second->scroll(scroll);
     }
 
     /**
@@ -358,7 +358,7 @@
     {
         std::map<std::string, OrxonoxOverlay*>::const_iterator it = overlays_s.find(name);
         if (it != overlays_s.end())
-            (*it).second->rotate(angle);
+            it->second->rotate(angle);
     }
 
     void OrxonoxOverlay::setOverlayGroup(OverlayGroup* group)

Modified: code/branches/presentation2/src/orxonox/pickup/ModifierPickup.cc
===================================================================
--- code/branches/presentation2/src/orxonox/pickup/ModifierPickup.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/orxonox/pickup/ModifierPickup.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -90,12 +90,12 @@
 
             for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++)
             {
-                pawn->getPickups().addAdditiveModifier((*it).first, (*it).second);
+                pawn->getPickups().addAdditiveModifier(it->first, it->second);
             }
 
             for (it = this->multiplicativeModifiers_.begin(); it != this->multiplicativeModifiers_.end(); it++)
             {
-                pawn->getPickups().addMultiplicativeModifier((*it).first, (*it).second);
+                pawn->getPickups().addMultiplicativeModifier(it->first, it->second);
             }
 
             if (this->duration_ > 0.0f)
@@ -127,12 +127,12 @@
 
             for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++)
             {
-                pawn->getPickups().removeAdditiveModifier((*it).first, (*it).second);
+                pawn->getPickups().removeAdditiveModifier(it->first, it->second);
             }
 
             for (it = this->multiplicativeModifiers_.begin(); it != this->multiplicativeModifiers_.end(); it++)
             {
-                pawn->getPickups().removeMultiplicativeModifier((*it).first, (*it).second);
+                pawn->getPickups().removeMultiplicativeModifier(it->first, it->second);
             }
 
             if (this->timer_.getRemainingTime() > 0.0f)
@@ -161,7 +161,7 @@
     {
         std::map<ModifierType::Value, float>::const_iterator it = this->additiveModifiers_.find(type);
         if (it != this->additiveModifiers_.end())
-            return (*it).second;
+            return it->second;
         else
             return 0.0f;
     }
@@ -174,7 +174,7 @@
     {
         std::map<ModifierType::Value, float>::const_iterator it = this->multiplicativeModifiers_.find(type);
         if (it != this->multiplicativeModifiers_.end())
-            return (*it).second;
+            return it->second;
         else
             return 1.0f;
     }

Modified: code/branches/presentation2/src/orxonox/pickup/PickupCollection.cc
===================================================================
--- code/branches/presentation2/src/orxonox/pickup/PickupCollection.cc	2009-12-22 20:21:28 UTC (rev 6399)
+++ code/branches/presentation2/src/orxonox/pickup/PickupCollection.cc	2009-12-22 21:05:38 UTC (rev 6400)
@@ -99,8 +99,8 @@
         this->bBlockRemovals_ = true;
         for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
         {
-            if((*it).second && (*it).second->getOwner())
-                (*it).second->dropped((*it).second->getOwner());
+            if(it->second && it->second->getOwner())
+                it->second->dropped(it->second->getOwner());
         }
         this->currentUsable_ = NULL;
         this->items_.clear();
@@ -123,7 +123,7 @@
             item_range bounds = this->items_.equal_range(item->getPickupIdentifier());
             for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++)
             {
-                if ((*it).second == item)
+                if (it->second == item)
                 {
                     return true;
                 }
@@ -175,7 +175,7 @@
             item_range bounds = this->items_.equal_range(item->getPickupIdentifier());
             for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++)
             {
-                if ((*it).second == item)
+                if (it->second == item)
                 {
                     this->items_.erase(it);
                     break;
@@ -216,7 +216,7 @@
 
         for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
         {
-            v += (*it).second;
+            v += it->second;
         }
 
         return v;
@@ -231,7 +231,7 @@
         modifier_range range = this->additiveModifiers_.equal_range(type);
         for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
         {
-            if ((*it).second == value)
+            if (it->second == value)
             {
                 this->additiveModifiers_.erase(it);
                 return;
@@ -259,7 +259,7 @@
         modifier_range range = this->multiplicativeModifiers_.equal_range(type);
         for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
         {
-            v *= (*it).second;
+            v *= it->second;
         }
 
         return v;
@@ -274,7 +274,7 @@
         modifier_range range = this->multiplicativeModifiers_.equal_range(type);
         for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
         {
-            if ((*it).second == value)
+            if (it->second == value)
             {
                 this->multiplicativeModifiers_.erase(it);
                 return;
@@ -334,8 +334,8 @@
 
         for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
         {
-            if ((*it).second->isA(ident))
-                ret.push_back(orxonox_cast<EquipmentItem*>((*it).second));
+            if (it->second->isA(ident))
+                ret.push_back(orxonox_cast<EquipmentItem*>(it->second));
         }
 
         return ret;
@@ -351,8 +351,8 @@
 
         for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
         {
-            if ((*it).second->isA(ident))
-                ret.push_back(orxonox_cast<PassiveItem*>((*it).second));
+            if (it->second->isA(ident))
+                ret.push_back(orxonox_cast<PassiveItem*>(it->second));
         }
 
         return ret;
@@ -368,8 +368,8 @@
 
         for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
         {
-            if ((*it).second->isA(ident))
-                ret.push_back(orxonox_cast<UsableItem*>((*it).second));
+            if (it->second->isA(ident))
+                ret.push_back(orxonox_cast<UsableItem*>(it->second));
         }
 
         return ret;




More information about the Orxonox-commit mailing list