Skip to content

Commit d1a3e59

Browse files
committed
Use const reference
1 parent 7395cbc commit d1a3e59

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/object/ispy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Ispy::update(float dt_sec)
124124
}
125125

126126
void
127-
Ispy::set_sprite_action(std::string action, int loops)
127+
Ispy::set_sprite_action(const std::string& action, int loops)
128128
{
129129
switch (m_dir)
130130
{

src/object/ispy.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Ispy final : public MovingSprite
3939
virtual void on_flip(float height) override;
4040

4141
private:
42-
void set_sprite_action(std::string action, int loops = -1);
42+
void set_sprite_action(const std::string& action, int loops = -1);
4343

4444
private:
4545
enum IspyState {

0 commit comments

Comments
 (0)