parent
26a11e20d0
commit
c514818b65
|
@ -247,16 +247,16 @@ static ProgramMemory getInitialProgramState(const Token* tok,
|
||||||
|
|
||||||
void ProgramMemoryState::insert(const ProgramMemory &pm, const Token* origin)
|
void ProgramMemoryState::insert(const ProgramMemory &pm, const Token* origin)
|
||||||
{
|
{
|
||||||
if(origin)
|
if (origin)
|
||||||
for(auto&& p:pm.values)
|
for (auto&& p:pm.values)
|
||||||
origins.insert(std::make_pair(p.first, origin));
|
origins.insert(std::make_pair(p.first, origin));
|
||||||
state.insert(pm);
|
state.insert(pm);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgramMemoryState::replace(const ProgramMemory &pm, const Token* origin)
|
void ProgramMemoryState::replace(const ProgramMemory &pm, const Token* origin)
|
||||||
{
|
{
|
||||||
if(origin)
|
if (origin)
|
||||||
for(auto&& p:pm.values)
|
for (auto&& p:pm.values)
|
||||||
origins[p.first] = origin;
|
origins[p.first] = origin;
|
||||||
state.replace(pm);
|
state.replace(pm);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue