Skip to content

Commit a99363a

Browse files
committed
refactor: remove shit copy
1 parent ddcf375 commit a99363a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/legacy/api/CommandAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
200200
if (command) {
201201
CommandOutput output(CommandOutputType::AllOutput);
202202
command->run(origin, output);
203-
for (auto msg : output.getMessages()) {
203+
for (auto& msg : output.getMessages()) {
204204
std::string temp;
205205
getI18n().getCurrentLanguage()->get(msg.getMessageId(), temp, msg.getParams());
206206
outputStr += temp.append("\n");

src/legacy/api/EntityAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ Local<Value> EntityClass::getAllTags(const Arguments& args) {
13571357
if (!entity) return Local<Value>();
13581358

13591359
Local<Array> arr = Array::newArray();
1360-
for (auto tag : entity->getTags()) {
1360+
for (auto& tag : entity->getTags()) {
13611361
arr.add(String::newString(tag));
13621362
}
13631363
return arr;

src/legacy/api/PlayerAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2970,7 +2970,7 @@ Local<Value> PlayerClass::getAllTags(const Arguments& args) {
29702970
if (!player) return Local<Value>();
29712971

29722972
Local<Array> arr = Array::newArray();
2973-
for (auto tag : player->getTags()) {
2973+
for (auto& tag : player->getTags()) {
29742974
arr.add(String::newString(tag));
29752975
}
29762976
return arr;

0 commit comments

Comments
 (0)