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.

Location:
code/trunk/src/orxonox/overlays/notifications
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.cc

    r3196 r3301  
    129129    std::string NotificationOverlay::clipMessage(const std::string & message)
    130130    {
    131         if(message.length() <= (unsigned int)this->queue_->getNotificationLength()) //!< If the message is not too long.
     131        if(message.length() <= static_cast<unsigned int>(this->queue_->getNotificationLength())) //!< If the message is not too long.
    132132            return message;
    133133        return message.substr(0, this->queue_->getNotificationLength());
  • code/trunk/src/orxonox/overlays/notifications/NotificationQueue.cc

    r3196 r3301  
    398398        timeString.erase(timeString.length()-1);
    399399        std::ostringstream stream;
    400         stream << (unsigned long)notification;
     400        stream << reinterpret_cast<unsigned long>(notification);
    401401        std::string addressString = stream.str() ;
    402402        container->name = "NotificationOverlay(" + timeString + ")&" + addressString;
Note: See TracChangeset for help on using the changeset viewer.