@@ -30,22 +30,22 @@ class LIBSCRATCHCPP_EXPORT Target
3030 /* ! Sets the target interface. */
3131 virtual void setInterface (IScratchTarget *newInterface) = 0;
3232
33- std::string name () const ;
33+ const std::string & name () const ;
3434 void setName (const std::string &name);
3535
36- std::vector<std::shared_ptr<Variable>> variables () const ;
36+ const std::vector<std::shared_ptr<Variable>> & variables () const ;
3737 int addVariable (std::shared_ptr<Variable> variable);
3838 std::shared_ptr<Variable> variableAt (int index) const ;
3939 int findVariable (const std::string &variableName) const ;
4040 int findVariableById (const std::string &id) const ;
4141
42- std::vector<std::shared_ptr<List>> lists () const ;
42+ const std::vector<std::shared_ptr<List>> & lists () const ;
4343 int addList (std::shared_ptr<List> list);
4444 std::shared_ptr<List> listAt (int index) const ;
4545 int findList (const std::string &listName) const ;
4646 int findListById (const std::string &id) const ;
4747
48- std::vector<std::shared_ptr<Block>> blocks () const ;
48+ const std::vector<std::shared_ptr<Block>> & blocks () const ;
4949 int addBlock (std::shared_ptr<Block> block);
5050 std::shared_ptr<Block> blockAt (int index) const ;
5151 int findBlock (const std::string &id) const ;
@@ -54,12 +54,12 @@ class LIBSCRATCHCPP_EXPORT Target
5454 int currentCostume () const ;
5555 void setCurrentCostume (int newCostume);
5656
57- std::vector<Costume> costumes () const ;
57+ const std::vector<Costume> & costumes () const ;
5858 int addCostume (const Costume &costume);
5959 Costume costumeAt (int index) const ;
6060 int findCostume (const std::string &costumeName) const ;
6161
62- std::vector<Sound> sounds () const ;
62+ const std::vector<Sound> & sounds () const ;
6363 int addSound (const Sound &sound);
6464 Sound soundAt (int index) const ;
6565 int findSound (const std::string &soundName) const ;
0 commit comments