Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 10:05:38 PM (15 years ago)
Author:
rgrieder
Message:

Replaced (*it). with it→ where I could find it. Should increased code readability.

Location:
code/branches/presentation2/src/libraries/core
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/ArgumentCompletionFunctions.cc

    r6394 r6400  
    8484                {
    8585                    if (boost::filesystem::is_directory(*file))
    86                         dirlist.push_back(ArgumentCompletionListElement((*file).string() + '/', getLowercase((*file).string()) + '/', (*file).BOOST_LEAF_FUNCTION() + '/'));
     86                        dirlist.push_back(ArgumentCompletionListElement(file->string() + '/', getLowercase(file->string()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
    8787                    else
    88                         filelist.push_back(ArgumentCompletionListElement((*file).string(), getLowercase((*file).string()), (*file).BOOST_LEAF_FUNCTION()));
     88                        filelist.push_back(ArgumentCompletionListElement(file->string(), getLowercase(file->string()), file->BOOST_LEAF_FUNCTION()));
    8989                    ++file;
    9090                }
  • code/branches/presentation2/src/libraries/core/BaseObject.cc

    r6394 r6400  
    291291        std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(name);
    292292        if (it != this->eventStates_.end())
    293             return ((*it).second);
     293            return (it->second);
    294294        else
    295295            return 0;
  • code/branches/presentation2/src/libraries/core/ClassTreeMask.cc

    r6394 r6400  
    850850        // If there is a first subclass, move the object-iterator to the first object of this class. Else go to the end
    851851        if (this->subclassIterator_ != this->subclasses_.end())
    852             this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();
     852            this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
    853853        else
    854854            this->objectIterator_ = ObjectList<BaseObject>::end();
    855855
    856856        // Check if the iterator points on a valid object. If not, go to the next object by calling ++
    857         if (!this->objectIterator_ || ((*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first)))
     857        if (!this->objectIterator_ || (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first)))
    858858            this->operator++();
    859859
     
    882882                    // Check if there really is a next class. If yes, move the object-iterator to the first object
    883883                    if (this->subclassIterator_ != this->subclasses_.end())
    884                         this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();
     884                        this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
    885885                    else
    886886                        return (*this);
     
    888888
    889889            // Repeat this until we reach a valid object or the end
    890             } while ((*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first));
     890            } while (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first));
    891891        }
    892892        return (*this);
  • code/branches/presentation2/src/libraries/core/CommandEvaluation.cc

    r6394 r6400  
    281281                output += ' ';
    282282
    283             output += (*it).getDisplay();
     283            output += it->getDisplay();
    284284        }
    285285        return output;
  • code/branches/presentation2/src/libraries/core/CommandExecutor.cc

    r6394 r6400  
    8282        std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_.find(name);
    8383        if (it != CommandExecutor::getInstance().consoleCommandShortcuts_.end())
    84             return (*it).second;
     84            return it->second;
    8585        else
    8686            return 0;
     
    9696        std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_LC_.find(name);
    9797        if (it != CommandExecutor::getInstance().consoleCommandShortcuts_LC_.end())
    98             return (*it).second;
     98            return it->second;
    9999        else
    100100            return 0;
     
    386386                {
    387387                    // There is exactly one possible argument
    388                     CommandExecutor::getEvaluation().argument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
    389                     CommandExecutor::getEvaluation().possibleArgument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
     388                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()->getString();
     389                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()->getString();
    390390                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    391391                    return;
     
    471471            if (it->second->hasConsoleCommands())
    472472                if (it->first.find(lowercase) == 0 || fragment.empty())
    473                     CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
     473                    CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
    474474    }
    475475
     
    482482            for (std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMapBegin(); it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd(); ++it)
    483483                if (it->first.find(lowercase) == 0 || fragment.empty())
    484                     CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
     484                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
    485485        }
    486486        else
     
    488488            for (std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMapBegin(); it != identifier->getLowercaseConsoleCommandMapEnd(); ++it)
    489489                if (it->first.find(lowercase) == 0 || fragment.empty())
    490                     CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
     490                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
    491491        }
    492492    }
     
    517517        const std::string& lowercase = getLowercase(name);
    518518        std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseStringIdentifierMap().find(lowercase);
    519         if ((it != Identifier::getLowercaseStringIdentifierMapEnd()) && (*it).second->hasConsoleCommands())
    520             return (*it).second;
     519        if ((it != Identifier::getLowercaseStringIdentifierMapEnd()) && it->second->hasConsoleCommands())
     520            return it->second;
    521521
    522522        return 0;
     
    530530            std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMap().find(lowercase);
    531531            if (it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd())
    532                 return (*it).second;
     532                return it->second;
    533533        }
    534534        else
     
    536536            std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMap().find(lowercase);
    537537            if (it != identifier->getLowercaseConsoleCommandMapEnd())
    538                 return (*it).second;
     538                return it->second;
    539539        }
    540540        return 0;
     
    599599                for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
    600600                {
    601                     if ((*(*it).first).size() > i)
     601                    if (it->first->size() > i)
    602602                    {
    603603                        if (it == list.begin())
    604604                        {
    605                             temp = (*(*it).first)[i];
     605                            temp = (*it->first)[i];
    606606                        }
    607607                        else
    608608                        {
    609                             if (temp != (*(*it).first)[i])
     609                            if (temp != (*it->first)[i])
    610610                                return output;
    611611                        }
  • code/branches/presentation2/src/libraries/core/ConfigFileManager.cc

    r6394 r6400  
    5151        if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    5252        {
    53             std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
    54             if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
    55                 return (*variable).second->set(value);
     53            std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
     54            if (variable != identifier->second->getLowercaseConfigValueMapEnd())
     55                return variable->second->set(value);
    5656        }
    5757        return false;
     
    6868        if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    6969        {
    70             std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
    71             if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
    72                 return (*variable).second->tset(value);
     70            std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
     71            if (variable != identifier->second->getLowercaseConfigValueMapEnd())
     72                return variable->second->tset(value);
    7373        }
    7474        return false;
     
    382382        {
    383383            std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName());
    384             if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues())
     384            if (it2 != Identifier::getStringIdentifierMapEnd() && it2->second->hasConfigValues())
    385385            {
    386386                // The section exists, delete comment
     
    389389                for (std::list<ConfigFileEntry*>::iterator it3 = (*it1)->entries_.begin(); it3 != (*it1)->entries_.end(); )
    390390                {
    391                     std::map<std::string, ConfigValueContainer*>::const_iterator it4 = (*it2).second->getConfigValueMap().find((*it3)->getName());
    392                     if (it4 != (*it2).second->getConfigValueMapEnd())
     391                    std::map<std::string, ConfigValueContainer*>::const_iterator it4 = it2->second->getConfigValueMap().find((*it3)->getName());
     392                    if (it4 != it2->second->getConfigValueMapEnd())
    393393                    {
    394394                        // The config-value exists, delete comment
     
    464464                if (it->second->hasConfigValues())
    465465                {
    466                     for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = (*it).second->getConfigValueMapBegin(); it2 != (*it).second->getConfigValueMapEnd(); ++it2)
     466                    for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = it->second->getConfigValueMapBegin(); it2 != it->second->getConfigValueMapEnd(); ++it2)
    467467                        it2->second->update();
    468468
  • code/branches/presentation2/src/libraries/core/Language.cc

    r6394 r6400  
    318318        for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
    319319        {
    320             file << (*it).second->getLabel() << '=' << (*it).second->getDefault() << std::endl;
     320            file << it->second->getLabel() << '=' << it->second->getDefault() << std::endl;
    321321        }
    322322
  • code/branches/presentation2/src/libraries/core/Loader.cc

    r6394 r6400  
    8080        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
    8181        {
    82             if ((*it).first == file)
     82            if (it->first == file)
    8383            {
    8484                Loader::files_s.erase(it);
     
    9292        bool success = true;
    9393        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
    94             if (!Loader::load((*it).first, (*it).second * mask))
     94            if (!Loader::load(it->first, it->second * mask))
    9595                success = false;
    9696
     
    291291            {
    292292                if (it != luaTags.end())
    293                     end = (*(it++)).first;
     293                    end = (it++)->first;
    294294                else
    295295                    end = std::string::npos;
  • code/branches/presentation2/src/libraries/core/NamespaceNode.cc

    r6394 r6400  
    4343    {
    4444        for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
    45             delete ((*(it++)).second);
     45            delete (it++)->second;
    4646    }
    4747
     
    8989                    it = this->subnodes_.insert(this->subnodes_.begin(), std::pair<std::string, NamespaceNode*>(firstPart, new NamespaceNode(firstPart, this)));
    9090
    91                 if ((*it).second->isHidden())
     91                if (it->second->isHidden())
    9292                {
    9393                    COUT(2) << "Warning: Subnamespace '" << firstPart << "' in namespace '" << this->name_ << "' is hidden and can't be accessed." << std::endl;
     
    9696                else
    9797                {
    98                     nodes = (*it).second->getNodeRelative(secondPart);
     98                    nodes = it->second->getNodeRelative(secondPart);
    9999                }
    100100            }
     
    105105                for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
    106106                {
    107                     if ((*it).first.find(firstPart) == ((*it).first.size() - firstPart.size()))
     107                    if (it->first.find(firstPart) == (it->first.size() - firstPart.size()))
    108108                    {
    109                         std::set<NamespaceNode*> temp2 = (*it).second->getNodeRelative(secondPart);
     109                        std::set<NamespaceNode*> temp2 = it->second->getNodeRelative(secondPart);
    110110                        nodes.insert(temp2.begin(), temp2.end());
    111111                        bFoundMatchingNamespace = true;
     
    133133        {
    134134            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
    135                 if ((*it).second->includes(ns))
     135                if (it->second->includes(ns))
    136136                    return true;
    137137        }
  • code/branches/presentation2/src/libraries/core/input/InputManager.cc

    r6394 r6400  
    275275        // destroy all user InputStates
    276276        while (statesByName_.size() > 0)
    277             this->destroyStateInternal((*statesByName_.rbegin()).second);
     277            this->destroyStateInternal(statesByName_.rbegin()->second);
    278278
    279279        if (!(internalState_ & Bad))
Note: See TracChangeset for help on using the changeset viewer.