summaryrefslogtreecommitdiff
path: root/src/sprite.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-24 19:17:41 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-02 20:57:16 +0200
commit59919635523d41f3a15120c83db4b7d080c155de (patch)
tree0da989bd2342b5a53d49c26893a3a544e7432fcc /src/sprite.h
parent7ea1c4574d6e845f95f2c4c3a1dd4a5d730bc6ba (diff)
downloadmana-59919635523d41f3a15120c83db4b7d080c155de.tar.gz
mana-59919635523d41f3a15120c83db4b7d080c155de.tar.bz2
mana-59919635523d41f3a15120c83db4b7d080c155de.tar.xz
mana-59919635523d41f3a15120c83db4b7d080c155de.zip
General code cleanups
* Removed some unused includes * Removed unused ListBox::mFont * Removed wrong cast to SDL_Scancode * Removed superfluous .c_str() * Removed superfluous explicit std::string construction * Removed unused variable * Use more emplace_back * Turned FindBeingFunctor into a lambda * Avoid needless pointer references for ambient layers and use a vector
Diffstat (limited to 'src/sprite.h')
-rw-r--r--src/sprite.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sprite.h b/src/sprite.h
index 8eb366d6..d7f5f1d7 100644
--- a/src/sprite.h
+++ b/src/sprite.h
@@ -46,7 +46,7 @@ class Sprite
*
* @returns true if the sprite changed, false otherwise
*/
- virtual bool play(std::string action) = 0;
+ virtual bool play(const std::string &action) = 0;
/**
* Inform the animation of the passed time so that it can output the
@@ -60,7 +60,7 @@ class Sprite
* Draw the current animation frame at the coordinates given in screen
* pixels.
*/
- virtual bool draw(Graphics* graphics, int posX, int posY) const = 0;
+ virtual bool draw(Graphics *graphics, int posX, int posY) const = 0;
/**
* Gets the width in pixels of the image