Made a pointer const.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2683 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -750,7 +750,7 @@ void RaceGUI::drawAllMessages(Kart* player_kart, int offset_x, int offset_y,
|
||||
* certain amount of time (unless time<0, then the message is displayed
|
||||
* once).
|
||||
**/
|
||||
void RaceGUI::addMessage(const char *msg, Kart *kart, float time,
|
||||
void RaceGUI::addMessage(const char *msg, const Kart *kart, float time,
|
||||
int font_size, int red, int green, int blue)
|
||||
{
|
||||
m_messages.push_back(TimedMessage(msg, kart, time, font_size, red, green, blue));
|
||||
|
||||
@@ -59,12 +59,12 @@ class RaceGUI: public BaseGUI
|
||||
float m_remaining_time; // time remaining before removing this message from screen
|
||||
int m_red,m_blue,m_green; // colour
|
||||
int m_font_size; // size
|
||||
Kart *m_kart;
|
||||
const Kart *m_kart;
|
||||
// std::vector needs standard copy-ctor and std-assignment op.
|
||||
// let compiler create defaults .. they'll do the job, no
|
||||
// deep copies here ..
|
||||
TimedMessage(const char *message,
|
||||
Kart *kart, float time, int size,
|
||||
const Kart *kart, float time, int size,
|
||||
int red, int green, int blue)
|
||||
{
|
||||
m_message = message;
|
||||
@@ -92,8 +92,8 @@ public:
|
||||
void select() {}
|
||||
void handle(GameAction, int);
|
||||
void handleKartAction(KartAction ka, int value);
|
||||
void addMessage(const char *message, Kart *kart, float time, int fonst_size,
|
||||
int red=255, int green=0, int blue=255);
|
||||
void addMessage(const char *message, const Kart *kart, float time,
|
||||
int fonst_size, int red=255, int green=0, int blue=255);
|
||||
|
||||
private:
|
||||
ulClock m_fps_timer;
|
||||
|
||||
Reference in New Issue
Block a user