Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3300 for code/trunk/src/core


Ignore:
Timestamp:
Jul 17, 2009, 11:53:35 PM (16 years ago)
Author:
rgrieder
Message:

Found a few more C-Style casts.

Location:
code/trunk/src/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/CommandLine.h

    r3280 r3300  
    196196    inline void CommandLine::getValue<std::string>(const std::string& name, std::string* value)
    197197    {
    198         *value = (std::string)(getArgument(name)->getValue().getString());
     198        *value = getArgument(name)->getValue().getString();
    199199    }
    200200
  • code/trunk/src/core/Game.cc

    r3280 r3300  
    287287                assert(it != this->statisticsTickTimes_.end());
    288288                int64_t lastTime = currentTime - this->configuration_->statisticsAvgLength_;
    289                 if ((int64_t)it->tickTime < lastTime)
     289                if (static_cast<int64_t>(it->tickTime) < lastTime)
    290290                {
    291291                    do
     
    295295                        ++it;
    296296                        assert(it != this->statisticsTickTimes_.end());
    297                     } while ((int64_t)it->tickTime < lastTime);
     297                    } while (static_cast<int64_t>(it->tickTime) < lastTime);
    298298                    this->statisticsTickTimes_.erase(this->statisticsTickTimes_.begin(), it);
    299299                }
  • code/trunk/src/core/Shell.cc

    r3280 r3300  
    129129        this->inputBuffer_->registerListener(this, &Shell::backspace, '\b', true);
    130130        this->inputBuffer_->registerListener(this, &Shell::deletechar, KeyCode::Delete);
    131         this->inputBuffer_->registerListener(this, &Shell::exit, (char)27, true);
     131        this->inputBuffer_->registerListener(this, &Shell::exit, static_cast<char>(27), true);
    132132        this->inputBuffer_->registerListener(this, &Shell::cursor_right, KeyCode::Right);
    133133        this->inputBuffer_->registerListener(this, &Shell::cursor_left, KeyCode::Left);
     
    149149        Shell& instance = Shell::getInstance();
    150150
    151         for (int i = instance.historyOffset_; i < (int)instance.commandHistory_.size(); ++i)
     151        for (unsigned int i = instance.historyOffset_; i < instance.commandHistory_.size(); ++i)
    152152            instance.addLine(instance.commandHistory_[i], -1);
    153         for (int i =  0; i < (int)instance.historyOffset_; ++i)
     153        for (unsigned int i =  0; i < instance.historyOffset_; ++i)
    154154            instance.addLine(instance.commandHistory_[i], -1);
    155155    }
  • code/trunk/src/core/TclThreadManager.cc

    r3280 r3300  
    577577                        this->debug("TclThread_query: " + command);
    578578                        try
    579                         {   output = (std::string)target->interpreter_->eval(command);   }
     579                        {   output = static_cast<std::string>(target->interpreter_->eval(command));   }
    580580                        catch (Tcl::tcl_error const &e)
    581                         {   this->error("Tcl error: " + (std::string)e.what());   }
     581                        {   this->error("Tcl error: " + static_cast<std::string>(e.what()));   }
    582582                        catch (std::exception const &e)
    583                         {   this->error("Error while executing Tcl: " + (std::string)e.what());   }
     583                        {   this->error("Error while executing Tcl: " + static_cast<std::string>(e.what()));   }
    584584                    }
    585585                    else
Note: See TracChangeset for help on using the changeset viewer.