Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6422


Ignore:
Timestamp:
Dec 26, 2009, 11:18:13 AM (14 years ago)
Author:
rgrieder
Message:

Uniform code-styling per file. As if I didn't know what to do

Location:
code/trunk/src/libraries/core
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/ConfigFileManager.cc

    r6417 r6422  
    489489    ConfigFileManager::~ConfigFileManager()
    490490    {
    491         for(std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); )
     491        for (std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); )
    492492            delete (it++)->second;
    493493    }
     
    507507    void ConfigFileManager::load()
    508508    {
    509         for(std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
     509        for (std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
    510510            it->second->load();
    511511    }
     
    513513    void ConfigFileManager::save()
    514514    {
    515         for(std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
     515        for (std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
    516516            it->second->save();
    517517    }
     
    519519    void ConfigFileManager::clean(bool bCleanComments)
    520520    {
    521         for(std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
     521        for (std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
    522522            this->clean(it->first, bCleanComments);
    523523    }
     
    545545    void ConfigFileManager::updateConfigValues()
    546546    {
    547         for(std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
     547        for (std::map<ConfigFileType, ConfigFile*>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
    548548            it->second->updateConfigValues();
    549549    }
  • code/trunk/src/libraries/core/DynLibManager.cc

    r6073 r6422  
    7575    {
    7676        // Unload & delete resources in turn
    77         for( DynLibList::iterator it = mLibList.begin(); it != mLibList.end(); ++it )
     77        for (DynLibList::iterator it = mLibList.begin(); it != mLibList.end(); ++it)
    7878        {
    7979            it->second->unload();
  • code/trunk/src/libraries/core/Game.cc

    r6417 r6422  
    445445        {
    446446            int indentation = 0;
    447             while(pos < str.size() && str[pos] == ' ')
     447            while (pos < str.size() && str[pos] == ' ')
    448448                ++indentation, ++pos;
    449449            startPos = pos;
    450             while(pos < str.size() && str[pos] != ' ')
     450            while (pos < str.size() && str[pos] != ' ')
    451451                ++pos;
    452452            stateStrings.push_back(std::make_pair(str.substr(startPos, pos - startPos), indentation));
  • code/trunk/src/libraries/core/IOConsole.cc

    r6417 r6422  
    345345    /*static*/ void IOConsole::resetTerminalMode()
    346346    {
    347         if(IOConsole::singletonPtr_s && IOConsole::singletonPtr_s->originalTerminalSettings_)
     347        if (IOConsole::singletonPtr_s && IOConsole::singletonPtr_s->originalTerminalSettings_)
    348348        {
    349349            tcsetattr(0, TCSANOW, IOConsole::singletonPtr_s->originalTerminalSettings_);
  • code/trunk/src/libraries/core/Loader.cc

    r6417 r6422  
    244244                    {
    245245                        it2++;
    246                         if(it->second && !(it2->second) && it2->first < pos)
     246                        if (it->second && !(it2->second) && it2->first < pos)
    247247                            it = ++it2;
    248248                        else
     
    307307                        unsigned int tempCounter = 1;
    308308                        size_t tempPos = pos++;
    309                         while(temp[++tempPos] == '=')
     309                        while (temp[++tempPos] == '=')
    310310                        {
    311311                            tempCounter++;
    312312                        }
    313                         if(temp[tempPos] != '[')
     313                        if (temp[tempPos] != '[')
    314314                        {
    315315                            tempCounter = 0;
    316316                        }
    317                         else if(tempCounter == 0)
     317                        else if (tempCounter == 0)
    318318                        {
    319319                            tempCounter = 1;
     
    329329                            unsigned int tempCounter = 1;
    330330                            size_t tempPos = pos++;
    331                             while(temp[++tempPos] == '=')
     331                            while (temp[++tempPos] == '=')
    332332                            {
    333333                                tempCounter++;
    334334                            }
    335                             if(temp[tempPos] != ']')
     335                            if (temp[tempPos] != ']')
    336336                            {
    337337                                tempCounter = 0;
    338338                            }
    339                             else if(tempCounter == 0)
     339                            else if (tempCounter == 0)
    340340                            {
    341341                                tempCounter = 1;
     
    346346                    }
    347347                    std::string equalSigns;
    348                     for(unsigned int i = 0; i < equalSignCounter; i++)
     348                    for (unsigned int i = 0; i < equalSignCounter; i++)
    349349                    {
    350350                        equalSigns += '=';
  • code/trunk/src/libraries/core/input/InputManager.cc

    r6417 r6422  
    404404                {
    405405                    // Get smallest possible priority between 1 and maxStateStackSize_s
    406                     for(std::map<int, InputState*>::reverse_iterator rit = activeStates_.rbegin();
     406                    for (std::map<int, InputState*>::reverse_iterator rit = activeStates_.rbegin();
    407407                        rit != activeStates_.rend(); ++rit)
    408408                    {
  • code/trunk/src/libraries/core/input/KeyBinder.cc

    r6417 r6422  
    291291        std::vector<std::string>& oldKeynames = this->allCommands_[button->bindingString_];
    292292        std::vector<std::string>::iterator it = std::find(oldKeynames.begin(), oldKeynames.end(), stream.str());
    293         if(it != oldKeynames.end())
    294         {
     293        if (it != oldKeynames.end())
    295294            oldKeynames.erase(it);
    296         }
    297295
    298296        if (!command.empty())
    299297        {
    300298            std::vector<std::string>& keynames = this->allCommands_[command];
    301             if( std::find(keynames.begin(), keynames.end(), stream.str()) == keynames.end())
    302             {
     299            if (std::find(keynames.begin(), keynames.end(), stream.str()) == keynames.end())
    303300                this->allCommands_[command].push_back(stream.str());
    304             }
    305301        }
    306302     }
     
    312308    const std::string& KeyBinder::getBinding(const std::string& commandName)
    313309    {
    314         if( this->allCommands_.find(commandName) != this->allCommands_.end())
     310        if (this->allCommands_.find(commandName) != this->allCommands_.end())
    315311        {
    316312            std::vector<std::string>& keynames = this->allCommands_[commandName];
     
    331327    const std::string& KeyBinder::getBinding(const std::string& commandName, unsigned int index)
    332328    {
    333         if( this->allCommands_.find(commandName) != this->allCommands_.end())
     329        if (this->allCommands_.find(commandName) != this->allCommands_.end())
    334330        {
    335331            std::vector<std::string>& keynames = this->allCommands_[commandName];
    336             if(index < keynames.size())
    337             {
     332            if (index < keynames.size())
    338333                return keynames[index];
    339             }
    340334
    341335            return BLANKSTRING;
     
    353347    unsigned int KeyBinder::getNumberOfBindings(const std::string& commandName)
    354348    {
    355         if( this->allCommands_.find(commandName) != this->allCommands_.end())
     349        if (this->allCommands_.find(commandName) != this->allCommands_.end())
    356350        {
    357351            std::vector<std::string>& keynames = this->allCommands_[commandName];
  • code/trunk/src/libraries/core/input/Keyboard.cc

    r6417 r6422  
    3636    {
    3737        // update modifiers
    38         if(arg.key == OIS::KC_RMENU    || arg.key == OIS::KC_LMENU)
     38        if (arg.key == OIS::KC_RMENU    || arg.key == OIS::KC_LMENU)
    3939            modifiers_ |= KeyboardModifier::Alt;   // alt key
    40         if(arg.key == OIS::KC_RCONTROL || arg.key == OIS::KC_LCONTROL)
     40        if (arg.key == OIS::KC_RCONTROL || arg.key == OIS::KC_LCONTROL)
    4141            modifiers_ |= KeyboardModifier::Ctrl;  // ctrl key
    42         if(arg.key == OIS::KC_RSHIFT   || arg.key == OIS::KC_LSHIFT)
     42        if (arg.key == OIS::KC_RSHIFT   || arg.key == OIS::KC_LSHIFT)
    4343            modifiers_ |= KeyboardModifier::Shift; // shift key
    4444
     
    5656    {
    5757        // update modifiers
    58         if(arg.key == OIS::KC_RMENU    || arg.key == OIS::KC_LMENU)
     58        if (arg.key == OIS::KC_RMENU    || arg.key == OIS::KC_LMENU)
    5959            modifiers_ &= ~KeyboardModifier::Alt;   // alt key
    60         if(arg.key == OIS::KC_RCONTROL || arg.key == OIS::KC_LCONTROL)
     60        if (arg.key == OIS::KC_RCONTROL || arg.key == OIS::KC_LCONTROL)
    6161            modifiers_ &= ~KeyboardModifier::Ctrl;  // ctrl key
    62         if(arg.key == OIS::KC_RSHIFT   || arg.key == OIS::KC_LSHIFT)
     62        if (arg.key == OIS::KC_RSHIFT   || arg.key == OIS::KC_LSHIFT)
    6363            modifiers_ &= ~KeyboardModifier::Shift; // shift key
    6464
Note: See TracChangeset for help on using the changeset viewer.