Browse Source

find instead of find_firt_of

cl-refactor
arkpar 10 years ago
parent
commit
231b708666
  1. 2
      alethzero/MainWin.cpp
  2. 2
      test/TestHelper.cpp

2
alethzero/MainWin.cpp

@ -639,7 +639,7 @@ pair<Address, bytes> Main::fromString(std::string const& _n) const
return make_pair(Address(), bytes()); return make_pair(Address(), bytes());
std::string n = _n; std::string n = _n;
if (n.find_first_of("0x") == 0) if (n.find("0x") == 0)
n.erase(0, 2); n.erase(0, 2);
auto g_newNameReg = getNameReg(); auto g_newNameReg = getNameReg();

2
test/TestHelper.cpp

@ -479,7 +479,7 @@ bytes importCode(json_spirit::mObject& _o)
{ {
bytes code; bytes code;
if (_o["code"].type() == json_spirit::str_type) if (_o["code"].type() == json_spirit::str_type)
if (_o["code"].get_str().find_first_of("0x") != 0) if (_o["code"].get_str().find("0x") != 0)
code = compileLLL(_o["code"].get_str(), false); code = compileLLL(_o["code"].get_str(), false);
else else
code = fromHex(_o["code"].get_str().substr(2)); code = fromHex(_o["code"].get_str().substr(2));

Loading…
Cancel
Save