File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ class LIBSCRATCHCPP_EXPORT Block : public Entity
27
27
28
28
void compile (Compiler *compiler);
29
29
30
- std::string opcode () const ;
30
+ const std::string & opcode () const ;
31
31
32
32
std::shared_ptr<Block> next () const ;
33
- std::string nextId () const ;
33
+ const std::string & nextId () const ;
34
34
void setNext (std::shared_ptr<Block> block);
35
35
void setNextId (const std::string &nextId);
36
36
37
37
std::shared_ptr<Block> parent () const ;
38
- std::string parentId () const ;
38
+ const std::string & parentId () const ;
39
39
void setParent (std::shared_ptr<Block> block);
40
40
void setParentId (const std::string &id);
41
41
@@ -57,7 +57,7 @@ class LIBSCRATCHCPP_EXPORT Block : public Entity
57
57
bool topLevel () const ;
58
58
59
59
std::shared_ptr<Comment> comment () const ;
60
- std::string commentId () const ;
60
+ const std::string & commentId () const ;
61
61
void setComment (std::shared_ptr<Comment> comment);
62
62
void setCommentId (const std::string &commentId);
63
63
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ void Block::compile(Compiler *compiler)
24
24
}
25
25
26
26
/* ! Returns the opcode. */
27
- std::string Block::opcode () const
27
+ const std::string & Block::opcode () const
28
28
{
29
29
return impl->opcode ;
30
30
}
@@ -101,7 +101,7 @@ std::shared_ptr<Block> Block::next() const
101
101
}
102
102
103
103
/* ! Returns the ID of the next block. */
104
- std::string Block::nextId () const
104
+ const std::string & Block::nextId () const
105
105
{
106
106
return impl->nextId ;
107
107
}
@@ -131,7 +131,7 @@ std::shared_ptr<Block> Block::parent() const
131
131
}
132
132
133
133
/* ! Returns the ID of the parent block. */
134
- std::string Block::parentId () const
134
+ const std::string & Block::parentId () const
135
135
{
136
136
return impl->parentId ;
137
137
}
@@ -301,7 +301,7 @@ std::shared_ptr<Comment> Block::comment() const
301
301
}
302
302
303
303
/* ! Returns the ID of the comment which is attached to this block. */
304
- std::string Block::commentId () const
304
+ const std::string & Block::commentId () const
305
305
{
306
306
return impl->commentId ;
307
307
}
You can’t perform that action at this time.
0 commit comments