Browse Source

Use insert rather than emplace - emplace isn't used elsewhere and I'm not sure windows supports it.

cl-refactor
Daniel Hams 11 years ago
parent
commit
56359a45aa
  1. 2
      libethereum/AddressState.h
  2. 2
      libethereum/State.cpp
  3. 4
      libethereum/State.h

2
libethereum/AddressState.h

@ -46,7 +46,7 @@ public:
{ {
auto mFinder = m_memory.find((u256)i); auto mFinder = m_memory.find((u256)i);
if (mFinder == m_memory.end()) if (mFinder == m_memory.end())
m_memory.emplace((u256)i,_memory[i]); m_memory.insert(std::pair<u256,u256>((u256)i,_memory[i]));
else else
mFinder->second = _memory[i]; mFinder->second = _memory[i];
} }

2
libethereum/State.cpp

@ -1172,7 +1172,7 @@ void State::execute(Address _myAddress, Address _txSender, u256 _txValue, u256s
require(2); require(2);
auto mFinder = tempMem.find(stack.back()); auto mFinder = tempMem.find(stack.back());
if (mFinder == tempMem.end()) if (mFinder == tempMem.end())
tempMem.emplace(stack.back(), stack[stack.size() - 2]); tempMem.insert(std::pair<u256,u256>(stack.back(), stack[stack.size() - 2]));
else else
mFinder->second = stack[stack.size() - 2]; mFinder->second = stack[stack.size() - 2];
stack.pop_back(); stack.pop_back();

4
libethereum/State.h

@ -274,7 +274,7 @@ inline std::ostream& operator<<(std::ostream& _out, State const& _s)
_out << std::endl << " [" << j.first << ":" << asHex(j.second) << "]"; _out << std::endl << " [" << j.first << ":" << asHex(j.second) << "]";
auto mFinder = mem.find(j.first); auto mFinder = mem.find(j.first);
if (mFinder == mem.end()) if (mFinder == mem.end())
mem.emplace(j.first, RLP(j.second).toInt<u256>()); mem.insert(std::pair<u256,u256>(j.first, RLP(j.second).toInt<u256>()));
else else
mFinder->second = RLP(j.second).toInt<u256>(); mFinder->second = RLP(j.second).toInt<u256>();
} }
@ -307,7 +307,7 @@ inline std::ostream& operator<<(std::ostream& _out, State const& _s)
_out << std::endl << " [" << j.first << ":" << asHex(j.second) << "]"; _out << std::endl << " [" << j.first << ":" << asHex(j.second) << "]";
auto mFinder = mem.find(j.first); auto mFinder = mem.find(j.first);
if (mFinder == mem.end()) if (mFinder == mem.end())
mem.emplace(j.first, RLP(j.second).toInt<u256>()); mem.insert(std::pair<u256,u256>(j.first, RLP(j.second).toInt<u256>()));
else else
mFinder->second = RLP(j.second).toInt<u256>(); mFinder->second = RLP(j.second).toInt<u256>();
} }

Loading…
Cancel
Save