diff --git a/core/2d/CCParticleSystem.cpp b/core/2d/CCParticleSystem.cpp index 03ee01f82f..60efd39dd9 100644 --- a/core/2d/CCParticleSystem.cpp +++ b/core/2d/CCParticleSystem.cpp @@ -2314,18 +2314,18 @@ void ParticleEmissionMaskCache::bakeEmissionMask(std::string_view maskId, float a = data[(y * w + x) * 4 + 3] / 255.0F; if (a >= alphaThreshold && !inverted) for (float i = 0; i < 1.0F; i += 1.0F / inbetweenSamples) - points.push_back({float(x + i), float(h - y + i)}); + points.emplace_back(Vec2{float(x + i), float(h - y + i)}); if (a < alphaThreshold && inverted) for (float i = 0; i < 1.0F; i += 1.0F / inbetweenSamples) - points.push_back({float(x + i), float(h - y + i)}); + points.emplace_back(Vec2{float(x + i), float(h - y + i)}); } else { float a = data[(y * w + x) * 4 + 3] / 255.0F; if (a >= alphaThreshold && !inverted) - points.push_back({float(x), float(h - y)}); + points.emplace_back(Vec2{float(x), float(h - y)}); if (a < alphaThreshold && inverted) - points.push_back({float(x), float(h - y)}); + points.emplace_back(Vec2{float(x), float(h - y)}); } } diff --git a/extensions/Live2D/Framework/src/CubismFramework.cpp b/extensions/Live2D/Framework/src/CubismFramework.cpp index 195ca4348c..db725029ca 100644 --- a/extensions/Live2D/Framework/src/CubismFramework.cpp +++ b/extensions/Live2D/Framework/src/CubismFramework.cpp @@ -228,7 +228,7 @@ void* CubismFramework::Allocate(csmSizeType size, const csmChar* fileName, csmIn if (s_allocationList) { - s_allocationList->emplace_back(address); + s_allocationList->push_back(address); } return address; @@ -242,7 +242,7 @@ void* CubismFramework::AllocateAligned(csmSizeType size, csmUint32 alignment, co if (s_allocationList) { - s_allocationList->emplace_back(address); + s_allocationList->push_back(address); } return address; diff --git a/tests/lua-tests/project/Classes/lua_test_bindings.cpp b/tests/lua-tests/project/Classes/lua_test_bindings.cpp index 10a86fb676..93727b5578 100644 --- a/tests/lua-tests/project/Classes/lua_test_bindings.cpp +++ b/tests/lua-tests/project/Classes/lua_test_bindings.cpp @@ -581,7 +581,7 @@ int lua_cocos2dx_DrawNode3D_drawCube(lua_State* L) } #endif // arg0[i] = vec3; - arg0.push_back(vec3); + arg0.emplace_back(vec3); lua_pop(L, 1); }