Skip to content

Commit 241dfc1

Browse files
committed
fix #347: Make Target::setCostumeIndex() virtual
1 parent 0d7e3b3 commit 241dfc1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/scratchcpp/sprite.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class LIBSCRATCHCPP_EXPORT Sprite : public Target
5050
double size() const;
5151
void setSize(double newSize);
5252

53-
void setCostumeIndex(int newCostumeIndex);
53+
void setCostumeIndex(int newCostumeIndex) override;
5454

5555
double direction() const;
5656
void setDirection(double newDirection);

include/scratchcpp/stage.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LIBSCRATCHCPP_EXPORT Stage : public Target
3030

3131
bool isStage() const override;
3232

33-
void setCostumeIndex(int newCostumeIndex);
33+
void setCostumeIndex(int newCostumeIndex) override;
3434

3535
int tempo() const;
3636
void setTempo(int newTempo);

include/scratchcpp/target.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class LIBSCRATCHCPP_EXPORT Target
5757
int findComment(const std::string &id) const;
5858

5959
int costumeIndex() const;
60-
void setCostumeIndex(int newCostumeIndex);
60+
virtual void setCostumeIndex(int newCostumeIndex);
6161

6262
std::shared_ptr<Costume> currentCostume() const;
6363

0 commit comments

Comments
 (0)