Changeset 6394 for code/branches/presentation2/src/modules/overlays
- Timestamp:
- Dec 22, 2009, 2:07:44 PM (15 years ago)
- Location:
- code/branches/presentation2/src/modules/overlays
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/modules/overlays/GUIOverlay.cc
r6387 r6394 69 69 if (this->isVisible()) 70 70 { 71 std::string str; 72 std::stringstream out; 71 std::ostringstream out; 73 72 out << reinterpret_cast<long>(this); 74 str = out.str();73 const std::string& str = out.str(); 75 74 COUT(1) << "GUIManager ptr: " << str << std::endl; 76 75 GUIManager::getInstance().showGUIExtra(this->guiName_, str); -
code/branches/presentation2/src/modules/overlays/OverlayText.cc
r5781 r6394 134 134 void OverlayText::setFont(const std::string& font) 135 135 { 136 if ( font != "")136 if (!font.empty()) 137 137 this->text_->setFontName(font); 138 138 } -
code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc
r6223 r6394 72 72 73 73 // create new material 74 std::stringmaterialname = "barmaterial" + multi_cast<std::string>(materialcount_s++);74 const std::string& materialname = "barmaterial" + multi_cast<std::string>(materialcount_s++); 75 75 Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialname, "General")); 76 76 material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA); -
code/branches/presentation2/src/modules/overlays/hud/HUDHealthBar.h
r6054 r6394 53 53 54 54 inline void setTextFont(const std::string& font) 55 { if ( font != "") { this->textoverlay_->setFont(font); } }55 { if (!font.empty()) { this->textoverlay_->setFont(font); } } 56 56 inline const std::string& getTextFont() const 57 57 { return this->textoverlay_->getFont(); } -
code/branches/presentation2/src/modules/overlays/hud/HUDNavigation.cc
r6378 r6394 36 36 37 37 #include "util/Math.h" 38 #include "util/StringUtils.h"39 38 #include "util/Convert.h" 40 39 #include "core/CoreIncludes.h" … … 108 107 void HUDNavigation::setFont(const std::string& font) 109 108 { 110 if (this->navText_ && font != "")109 if (this->navText_ && !font.empty()) 111 110 this->navText_->setFontName(font); 112 111 } -
code/branches/presentation2/src/modules/overlays/hud/HUDRadar.cc
r5781 r6394 126 126 panel = *itRadarDots_; 127 127 ++itRadarDots_; 128 std::stringmaterialName = TextureGenerator::getMaterialName(128 const std::string& materialName = TextureGenerator::getMaterialName( 129 129 shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour()); 130 130 if (materialName != panel->getMaterialName()) -
code/branches/presentation2/src/modules/overlays/hud/TeamBaseMatchScore.cc
r5929 r6394 71 71 if (this->owner_) 72 72 { 73 std::string bases1 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ")";74 std::string bases2 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ")";73 const std::string& bases1 = '(' + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ')'; 74 const std::string& bases2 = '(' + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ')'; 75 75 76 std::stringscore1 = multi_cast<std::string>(this->owner_->getTeamPoints(0));77 std::stringscore2 = multi_cast<std::string>(this->owner_->getTeamPoints(1));76 const std::string& score1 = multi_cast<std::string>(this->owner_->getTeamPoints(0)); 77 const std::string& score2 = multi_cast<std::string>(this->owner_->getTeamPoints(1)); 78 78 79 79 std::string output1; … … 99 99 } 100 100 101 std::string output = "";101 std::string output; 102 102 if (this->bShowBases_ || this->bShowScore_) 103 103 { 104 104 if (this->bShowLeftTeam_ && this->bShowRightTeam_) 105 output = output1 + ":"+ output2;105 output = output1 + ':' + output2; 106 106 else if (this->bShowLeftTeam_ || this->bShowRightTeam_) 107 107 output = output1 + output2;
Note: See TracChangeset
for help on using the changeset viewer.