Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 18, 2009, 4:03:59 PM (15 years ago)
Author:
rgrieder
Message:

Found even more casts. They sure aren't all of them, but I hope to have caught every pointer C-style cast because they can be very dangerous.
Note: I didn't do the pointer casts in the network library because that would have taken way too long.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSDedicated.cc

    r3300 r3301  
    193193//                             boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
    194194                            std::cout << endl << CommandExecutor::hint( std::string((const char*)this->commandLine_,inputIterator_) ) << endl;
    195                             strncpy((char*)this->commandLine_, CommandExecutor::complete( std::string((const char*)this->commandLine_,inputIterator_) ).c_str(), MAX_COMMAND_LENGTH);
     195                            strncpy(reinterpret_cast<char*>(this->commandLine_), CommandExecutor::complete( std::string(reinterpret_cast<char*>(this->commandLine_),inputIterator_) ).c_str(), MAX_COMMAND_LENGTH);
    196196                            inputIterator_ = strlen((const char*)this->commandLine_);
    197197                            break;
     
    275275    void GSDedicated::insertCharacter( unsigned int position, char c )
    276276    {
    277 //         std::cout << endl << (unsigned int)c << endl;
     277//         std::cout << endl << static_cast<unsigned int>(c) << endl;
    278278        // check that we do not exceed MAX_COMMAND_LENGTH
    279279        if( inputIterator_+1 < MAX_COMMAND_LENGTH )
Note: See TracChangeset for help on using the changeset viewer.