File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ class LIBSCRATCHCPP_EXPORT Block : public Entity
3939 void setParent (std::shared_ptr<Block> block);
4040 void setParentId (const std::string &id);
4141
42- std::vector<std::shared_ptr<Input>> inputs () const ;
42+ const std::vector<std::shared_ptr<Input>> & inputs () const ;
4343 int addInput (std::shared_ptr<Input> input);
4444 std::shared_ptr<Input> inputAt (int index) const ;
4545 int findInput (const std::string &inputName) const ;
4646 Input *findInputById (int id) const ;
4747
48- std::vector<std::shared_ptr<Field>> fields () const ;
48+ const std::vector<std::shared_ptr<Field>> & fields () const ;
4949 int addField (std::shared_ptr<Field> field);
5050 std::shared_ptr<Field> fieldAt (int index) const ;
5151 int findField (const std::string &fieldName) const ;
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ void Block::setParentId(const std::string &id)
155155}
156156
157157/* ! Returns the list of inputs. */
158- std::vector<std::shared_ptr<Input>> Block::inputs () const
158+ const std::vector<std::shared_ptr<Input>> & Block::inputs () const
159159{
160160 return impl->inputs ;
161161}
@@ -217,7 +217,7 @@ void Block::updateInputMap()
217217}
218218
219219/* ! Returns the list of fields. */
220- std::vector<std::shared_ptr<Field>> Block::fields () const
220+ const std::vector<std::shared_ptr<Field>> & Block::fields () const
221221{
222222 return impl->fields ;
223223}
You can’t perform that action at this time.
0 commit comments