summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-24 19:51:16 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-26 22:38:41 +0100
commitbd7ad9aedd87c857477bbfcf7653af91a80f4df6 (patch)
tree6e0c678f37ebf7b0c020ec95773c79c552834140 /src
parent20c224aacc6b9669828f3c7e7b2c19b9b95d90ff (diff)
downloadmana-bd7ad9aedd87c857477bbfcf7653af91a80f4df6.tar.gz
mana-bd7ad9aedd87c857477bbfcf7653af91a80f4df6.tar.bz2
mana-bd7ad9aedd87c857477bbfcf7653af91a80f4df6.tar.xz
mana-bd7ad9aedd87c857477bbfcf7653af91a80f4df6.zip
Removed 'inline' keyword where it's not of any value
Members that are implemented inline are already inline, there is no need to mark them as such. Made two inline members of OpenGLGraphics private since because they are marked as inline, they can't be used from other classes. Reviewed-by: Erik Schilling
Diffstat (limited to 'src')
-rw-r--r--src/being.h2
-rw-r--r--src/configuration.h12
-rw-r--r--src/event.h20
-rw-r--r--src/graphics.h4
-rw-r--r--src/gui/widgets/listbox.h2
-rw-r--r--src/gui/widgets/textbox.h4
-rw-r--r--src/gui/widgets/textpreview.h14
-rw-r--r--src/gui/windowmenu.h8
-rw-r--r--src/openglgraphics.h8
-rw-r--r--src/resources/userpalette.h10
-rw-r--r--src/textrenderer.h18
11 files changed, 51 insertions, 51 deletions
diff --git a/src/being.h b/src/being.h
index a7ba29fc..f38cb9e1 100644
--- a/src/being.h
+++ b/src/being.h
@@ -379,7 +379,7 @@ class Being : public ActorSprite, public EventListener
*
* @see setPosition(const Vector &pos)
*/
- inline void setPosition(float x, float y, float z = 0.0f)
+ void setPosition(float x, float y, float z = 0.0f)
{
setPosition(Vector(x, y, z));
}
diff --git a/src/configuration.h b/src/configuration.h
index a675002b..f6130c94 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -218,22 +218,22 @@ class Configuration : public ConfigurationObject
void setValue(const std::string &key, const std::string &value);
- inline void setValue(const std::string &key, const char *value)
+ void setValue(const std::string &key, const char *value)
{ setValue(key, std::string(value)); }
- inline void setValue(const std::string &key, float value)
+ void setValue(const std::string &key, float value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, double value)
+ void setValue(const std::string &key, double value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, int value)
+ void setValue(const std::string &key, int value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, unsigned value)
+ void setValue(const std::string &key, unsigned value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, bool value)
+ void setValue(const std::string &key, bool value)
{ setValue(key, value ? "1" : "0"); }
/**
diff --git a/src/event.h b/src/event.h
index c4dcfc9b..d547d3f4 100644
--- a/src/event.h
+++ b/src/event.h
@@ -145,7 +145,7 @@ public:
* Returns the given variable if it is set and an integer, returning the
* given default otherwise.
*/
- inline int getInt(const std::string &key, int defaultValue) const
+ int getInt(const std::string &key, int defaultValue) const
{ try { return getInt(key); } catch (BadEvent) { return defaultValue; }}
/**
@@ -169,8 +169,8 @@ public:
* Returns the given variable if it is set and a string, returning the
* given default otherwise.
*/
- inline std::string getString(const std::string &key,
- const std::string &defaultValue) const
+ std::string getString(const std::string &key,
+ const std::string &defaultValue) const
{ try { return getString(key); } catch (BadEvent) { return defaultValue; }}
/**
@@ -195,7 +195,7 @@ public:
* Returns the given variable if it is set and a floating-point, returning
* the given default otherwise.
*/
- inline double getFloat(const std::string &key, float defaultValue) const
+ double getFloat(const std::string &key, float defaultValue) const
{ try { return getFloat(key); } catch (BadEvent) { return defaultValue; }}
/**
@@ -219,7 +219,7 @@ public:
* Returns the given variable if it is set and a boolean, returning the
* given default otherwise.
*/
- inline bool getBool(const std::string &key, bool defaultValue) const
+ bool getBool(const std::string &key, bool defaultValue) const
{ try { return getBool(key); } catch (BadEvent) { return defaultValue; }}
/**
@@ -243,7 +243,7 @@ public:
* Returns the given variable if it is set and an Item, returning the
* given default otherwise.
*/
- inline Item *getItem(const std::string &key, Item *defaultValue) const
+ Item *getItem(const std::string &key, Item *defaultValue) const
{ try { return getItem(key); } catch (BadEvent) { return defaultValue; }}
/**
@@ -267,8 +267,8 @@ public:
* Returns the given variable if it is set and an actor, returning the
* given default otherwise.
*/
- inline ActorSprite *getActor(const std::string &key,
- ActorSprite *defaultValue) const
+ ActorSprite *getActor(const std::string &key,
+ ActorSprite *defaultValue) const
{ try { return getActor(key); } catch (BadEvent) { return defaultValue; }}
/**
@@ -281,7 +281,7 @@ public:
/**
* Sends this event to all classes listening to the given channel.
*/
- inline void trigger(Channel channel) const
+ void trigger(Channel channel) const
{ trigger(channel, *this); }
/**
@@ -293,7 +293,7 @@ public:
* Sends an empty event with the given name to all classes listening to the
* given channel.
*/
- static inline void trigger(Channel channel, Type type)
+ static void trigger(Channel channel, Type type)
{ trigger(channel, Event(type)); }
protected:
diff --git a/src/graphics.h b/src/graphics.h
index 5e39d510..bd68a79f 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -180,8 +180,8 @@ class Graphics : public gcn::SDLGraphics
* Draws a rectangle using images. 4 corner images, 4 side images and 1
* image for the inside.
*/
- inline void drawImageRect(const gcn::Rectangle &area,
- const ImageRect &imgRect)
+ void drawImageRect(const gcn::Rectangle &area,
+ const ImageRect &imgRect)
{
drawImageRect(area.x, area.y, area.width, area.height, imgRect);
}
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 61c564bb..a887a351 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -45,7 +45,7 @@ class ListBox : public gcn::ListBox
*
* @param font the font to use.
*/
- inline void setFont(gcn::Font *font)
+ void setFont(gcn::Font *font)
{
mFont = font;
}
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 6b947e0b..548f2734 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -36,7 +36,7 @@ class TextBox : public gcn::TextBox
public:
TextBox();
- inline void setTextColor(const gcn::Color *color)
+ void setTextColor(const gcn::Color *color)
{ mTextColor = color; }
/**
@@ -52,7 +52,7 @@ class TextBox : public gcn::TextBox
/**
* Draws the text.
*/
- inline void draw(gcn::Graphics *graphics)
+ void draw(gcn::Graphics *graphics)
{
setForegroundColor(*mTextColor);
gcn::TextBox::draw(graphics);
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index 2be88ae7..8fa63691 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -39,7 +39,7 @@ class TextPreview : public gcn::Widget
*
* @param color the color to set
*/
- inline void setTextColor(const gcn::Color *color)
+ void setTextColor(const gcn::Color *color)
{
mTextColor = color;
}
@@ -49,7 +49,7 @@ class TextPreview : public gcn::Widget
*
* @param alpha whether to use alpha values for the text or not
*/
- inline void useTextAlpha(bool alpha)
+ void useTextAlpha(bool alpha)
{
mTextAlpha = alpha;
}
@@ -60,7 +60,7 @@ class TextPreview : public gcn::Widget
*
* @param color the color to set
*/
- inline void setTextBGColor(const gcn::Color *color)
+ void setTextBGColor(const gcn::Color *color)
{
mTextBGColor = color;
}
@@ -70,7 +70,7 @@ class TextPreview : public gcn::Widget
*
* @param color the color to set
*/
- inline void setBGColor(const gcn::Color *color)
+ void setBGColor(const gcn::Color *color)
{
mBGColor = color;
}
@@ -80,7 +80,7 @@ class TextPreview : public gcn::Widget
*
* @param font the font to use.
*/
- inline void setFont(gcn::Font *font)
+ void setFont(gcn::Font *font)
{
mFont = font;
}
@@ -90,7 +90,7 @@ class TextPreview : public gcn::Widget
*
* @param shadow true, if a shadow is wanted, false else
*/
- inline void setShadow(bool shadow)
+ void setShadow(bool shadow)
{
mShadow = shadow;
}
@@ -100,7 +100,7 @@ class TextPreview : public gcn::Widget
*
* @param outline true, if an outline is wanted, false else
*/
- inline void setOutline(bool outline)
+ void setOutline(bool outline)
{
mOutline = outline;
}
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index 962abaf5..427c31b9 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -55,10 +55,10 @@ class WindowMenu : public Container,
void updatePopUpCaptions();
private:
- inline void addButton(const std::string& text, int &x, int &h,
- const std::string& iconPath = std::string(),
- KeyboardConfig::KeyAction key =
- KeyboardConfig::KEY_NO_VALUE);
+ void addButton(const std::string& text, int &x, int &h,
+ const std::string& iconPath = std::string(),
+ KeyboardConfig::KeyAction key =
+ KeyboardConfig::KEY_NO_VALUE);
EmotePopup *mEmotePopup;
};
diff --git a/src/openglgraphics.h b/src/openglgraphics.h
index 16448a79..8361f7f7 100644
--- a/src/openglgraphics.h
+++ b/src/openglgraphics.h
@@ -102,10 +102,6 @@ class OpenGLGraphics : public Graphics
void setTargetPlane(int width, int height);
- void drawQuadArrayfi(int size);
-
- void drawQuadArrayii(int size);
-
/**
* Takes a screenshot and returns it as SDL surface.
*/
@@ -119,6 +115,10 @@ class OpenGLGraphics : public Graphics
void setTexturingAndBlending(bool enable);
private:
+ void drawQuadArrayfi(int size);
+
+ void drawQuadArrayii(int size);
+
GLfloat *mFloatTexArray;
GLint *mIntTexArray;
GLint *mIntVertArray;
diff --git a/src/resources/userpalette.h b/src/resources/userpalette.h
index 1dd5cf6a..9856fd96 100644
--- a/src/resources/userpalette.h
+++ b/src/resources/userpalette.h
@@ -67,7 +67,7 @@ class UserPalette : public Palette, public gcn::ListModel
*
* @return the requested committed color
*/
- inline const gcn::Color &getCommittedColor(int type)
+ const gcn::Color &getCommittedColor(int type)
{
return mColors[type].committedColor;
}
@@ -79,7 +79,7 @@ class UserPalette : public Palette, public gcn::ListModel
*
* @return the requested test color
*/
- inline const gcn::Color &getTestColor(int type)
+ const gcn::Color &getTestColor(int type)
{
return mColors[type].testColor;
}
@@ -90,7 +90,7 @@ class UserPalette : public Palette, public gcn::ListModel
* @param type the color type requested
* @param color the color that should be tested
*/
- inline void setTestColor(int type, gcn::Color color)
+ void setTestColor(int type, gcn::Color color)
{
mColors[type].testColor = color;
}
@@ -123,7 +123,7 @@ class UserPalette : public Palette, public gcn::ListModel
*
* @return the number of colors known
*/
- inline int getNumberOfElements() { return mColors.size(); }
+ int getNumberOfElements() { return mColors.size(); }
/**
* Returns the name of the ith color.
@@ -137,7 +137,7 @@ class UserPalette : public Palette, public gcn::ListModel
/**
* Commit the colors
*/
- inline void commit()
+ void commit()
{
commit(false);
}
diff --git a/src/textrenderer.h b/src/textrenderer.h
index fccdd3c7..505cbfab 100644
--- a/src/textrenderer.h
+++ b/src/textrenderer.h
@@ -32,18 +32,18 @@
*/
class TextRenderer
{
- public:
+public:
/**
* Renders a specified text.
*/
- static inline void renderText(gcn::Graphics *graphics,
- const std::string &text,
- int x, int y,
- gcn::Graphics::Alignment align,
- const gcn::Color &color,
- gcn::Font *font,
- bool outline = false,
- bool shadow = false)
+ static void renderText(gcn::Graphics *graphics,
+ const std::string &text,
+ int x, int y,
+ gcn::Graphics::Alignment align,
+ const gcn::Color &color,
+ gcn::Font *font,
+ bool outline = false,
+ bool shadow = false)
{
graphics->setFont(font);