Skip to content

Commit 255b6f9

Browse files
author
Jim Hague
committed
Revise emplace_back() to push_back() and fix Mac clang complaint.
In both cases we have a created object we want to move onto the vector. Mac's clang objects to the first std::move() as it's applied to a temporary and disables copy elision.
1 parent b2c942f commit 255b6f9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

react_juce/core/EcmascriptEngine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ namespace reactjuce
153153
{
154154
if (!i.isString())
155155
return false;
156-
sources.emplace_back(std::move(i.toString()));
156+
sources.push_back(i.toString());
157157
}
158158

159159
bool firstSegmentInLine = true;
@@ -182,7 +182,7 @@ namespace reactjuce
182182

183183
if (*p == ';')
184184
{
185-
mappings.emplace_back(std::move(lineSegments));
185+
mappings.push_back(std::move(lineSegments));
186186
firstSegmentInLine = true;
187187
}
188188
}

0 commit comments

Comments
 (0)