mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
style changes
This commit is contained in:
parent
f22f8ba2ef
commit
ec85da431a
@ -228,25 +228,19 @@ byte toByte(json_spirit::mValue const& _v)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bytes importByteArray(const std::string& str)
|
||||
bytes importByteArray(std::string const& _str)
|
||||
{
|
||||
bytes data;
|
||||
if (str.find_first_of("0x") == 0)
|
||||
data = fromHex(str.substr(2));
|
||||
else
|
||||
data = fromHex(str);
|
||||
return data;
|
||||
return fromHex(_str.substr(0, 2) == "0x" ? _str.substr(2) : _str);
|
||||
}
|
||||
|
||||
bytes importData(json_spirit::mObject& _o)
|
||||
{
|
||||
bytes data;
|
||||
if (_o["data"].type() == json_spirit::str_type)
|
||||
data = importByteArray(_o["data"].get_str());
|
||||
data = importByteArray(_o["data"].get_str());
|
||||
else
|
||||
for (auto const& j: _o["data"].get_array())
|
||||
data.push_back(toByte(j));
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ u256 toInt(json_spirit::mValue const& _v);
|
||||
byte toByte(json_spirit::mValue const& _v);
|
||||
bytes importCode(json_spirit::mObject& _o);
|
||||
bytes importData(json_spirit::mObject& _o);
|
||||
bytes importByteArray(const std::string& str);
|
||||
bytes importByteArray(std::string const& _str);
|
||||
eth::LogEntries importLog(json_spirit::mArray& _o);
|
||||
json_spirit::mArray exportLog(eth::LogEntries _logs);
|
||||
void checkOutput(bytes const& _output, json_spirit::mObject& _o);
|
||||
|
Loading…
Reference in New Issue
Block a user