Correct use of emplace_back

This commit is contained in:
Bhargava Shastry 2021-02-09 10:47:22 +01:00
parent 1709b2924b
commit cf08c9b255

View File

@ -1388,7 +1388,7 @@ void ProtoConverter::visit(Statement const& _x)
void ProtoConverter::openBlockScope() void ProtoConverter::openBlockScope()
{ {
m_scopeFuncs.emplace_back(vector<string>{}); m_scopeFuncs.emplace_back();
// Create new block scope inside current function scope // Create new block scope inside current function scope
if (m_inFunctionDef) if (m_inFunctionDef)
@ -1409,9 +1409,9 @@ void ProtoConverter::openBlockScope()
} }
else else
{ {
m_globalVars.emplace_back(vector<string>{}); m_globalVars.emplace_back();
if (m_inForInitScope && m_forInitScopeExtEnabled) if (m_inForInitScope && m_forInitScopeExtEnabled)
m_globalForLoopInitVars.emplace_back(vector<string>{}); m_globalForLoopInitVars.emplace_back();
} }
} }