Changeset 3301 for code/trunk/src/orxonox/overlays
- Timestamp:
- Jul 18, 2009, 4:03:59 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/overlays
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/GUIOverlay.cc
r3300 r3301 67 67 std::string str; 68 68 std::stringstream out; 69 out << static_cast<long>(this);69 out << reinterpret_cast<long>(this); 70 70 str = out.str(); 71 71 GUIManager::getInstance().executeCode("showCursor()"); -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r3300 r3301 82 82 // Get aspect ratio from the render window. Later on, we get informed automatically 83 83 Ogre::RenderWindow* defaultWindow = GraphicsManager::getInstance().getRenderWindow(); 84 this->windowAspectRatio_ = (float)defaultWindow->getWidth() / defaultWindow->getHeight();84 this->windowAspectRatio_ = static_cast<float>(defaultWindow->getWidth()) / defaultWindow->getHeight(); 85 85 this->sizeCorrectionChanged(); 86 86 … … 183 183 void OrxonoxOverlay::windowResized(unsigned int newWidth, unsigned int newHeight) 184 184 { 185 this->windowAspectRatio_ = newWidth/(float)newHeight;185 this->windowAspectRatio_ = static_cast<float>(newWidth) / newHeight; 186 186 this->sizeCorrectionChanged(); 187 187 } … … 215 215 if (angle < 0.0) 216 216 angle = -angle; 217 angle -= 180.0f * static_cast e<int>(angle / 180.0);217 angle -= 180.0f * static_cast<int>(angle / 180.0); 218 218 219 219 // take the reverse if angle is about 90 degrees -
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r3300 r3301 93 93 @brief Destructor: Destroys the TextAreas. 94 94 */ 95 InGameConsole::~InGameConsole( void)95 InGameConsole::~InGameConsole() 96 96 { 97 97 this->deactivate(); -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc
r3280 r3301 141 141 142 142 // set text 143 int dist = (int) getDist2Focus();143 int dist = static_cast<int>(getDist2Focus()); 144 144 navText_->setCaption(multi_cast<std::string>(dist)); 145 145 float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3; -
code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.cc
r3196 r3301 129 129 std::string NotificationOverlay::clipMessage(const std::string & message) 130 130 { 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. 132 132 return message; 133 133 return message.substr(0, this->queue_->getNotificationLength()); -
code/trunk/src/orxonox/overlays/notifications/NotificationQueue.cc
r3196 r3301 398 398 timeString.erase(timeString.length()-1); 399 399 std::ostringstream stream; 400 stream << (unsigned long)notification;400 stream << reinterpret_cast<unsigned long>(notification); 401 401 std::string addressString = stream.str() ; 402 402 container->name = "NotificationOverlay(" + timeString + ")&" + addressString;
Note: See TracChangeset
for help on using the changeset viewer.