[Orxonox-commit 281] r2926 - in trunk/src/orxonox: objects/gametypes overlays/notifications
rgrieder at orxonox.net
rgrieder at orxonox.net
Sun Apr 19 22:46:06 CEST 2009
Author: rgrieder
Date: 2009-04-19 22:46:06 +0200 (Sun, 19 Apr 2009)
New Revision: 2926
Modified:
trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc
trunk/src/orxonox/overlays/notifications/NotificationQueue.cc
trunk/src/orxonox/overlays/notifications/NotificationQueue.h
Log:
- Using class { static const float foo = 3.2; }; is non standard C++, only integral types are allowed to be defined this way.
--> Exported symbol to the source file
- Removed two unsigned/signed comparison warnings
Modified: trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc
===================================================================
--- trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc 2009-04-19 19:22:47 UTC (rev 2925)
+++ trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc 2009-04-19 20:46:06 UTC (rev 2926)
@@ -70,7 +70,7 @@
std::vector<unsigned int> playersperteam(this->teams_, 0);
for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
- if (it->second < this->teams_ && it->second >= 0)
+ if (it->second < (int)this->teams_ && it->second >= 0)
playersperteam[it->second]++;
unsigned int minplayers = (unsigned int)-1;
@@ -121,7 +121,7 @@
// Only use spawnpoints of the own team (or non-team-spawnpoints)
std::set<SpawnPoint*> teamSpawnPoints = this->spawnpoints_;
- for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
+ for (std::set<SpawnPoint*>::iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
{
if ((*it)->isA(Class(TeamSpawnPoint)))
{
@@ -159,7 +159,7 @@
// Set the team colour
std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
- if (it_player != this->teamnumbers_.end() && it_player->second >= 0 && it_player->second < this->teamcolours_.size())
+ if (it_player != this->teamnumbers_.end() && it_player->second >= 0 && it_player->second < (int)this->teamcolours_.size())
{
if (pawn)
{
Modified: trunk/src/orxonox/overlays/notifications/NotificationQueue.cc
===================================================================
--- trunk/src/orxonox/overlays/notifications/NotificationQueue.cc 2009-04-19 19:22:47 UTC (rev 2925)
+++ trunk/src/orxonox/overlays/notifications/NotificationQueue.cc 2009-04-19 20:46:06 UTC (rev 2926)
@@ -53,6 +53,7 @@
const std::string NotificationQueue::DEFAULT_FONT = "VeraMono";
const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0);
+ const float NotificationQueue::DEFAULT_FONT_SIZE = 0.025;
/**
@brief
@@ -272,7 +273,7 @@
}
string->clear();
bool first = true;
- for(std::set<std::string>::iterator it = this->targets_.begin(); it != this->targets_.end(); it++) //!< Iterate through the set of targets.
+ for(std::set<std::string>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++) //!< Iterate through the set of targets.
{
if(!first)
{
Modified: trunk/src/orxonox/overlays/notifications/NotificationQueue.h
===================================================================
--- trunk/src/orxonox/overlays/notifications/NotificationQueue.h 2009-04-19 19:22:47 UTC (rev 2925)
+++ trunk/src/orxonox/overlays/notifications/NotificationQueue.h 2009-04-19 20:46:06 UTC (rev 2926)
@@ -165,7 +165,7 @@
static const int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed.
static const int DEFAULT_LENGTH = 64; //!< The default maximum number of Notifications displayed.
static const int DEFAULT_DISPLAY_TIME = 30; //!< The default display time.
- static const float DEFAULT_FONT_SIZE = 0.025; //!< The default font size.
+ static const float DEFAULT_FONT_SIZE; //!< The default font size.
static const std::string DEFAULT_FONT; //!< The default font.
static const Vector2 DEFAULT_POSITION; //!< the default position.
More information about the Orxonox-commit
mailing list