Browse Source

small changes

cl-refactor
yann300 10 years ago
parent
commit
ad1e845473
  1. 4
      mix/ContractCallDataEncoder.cpp
  2. 2
      mix/ContractCallDataEncoder.h

4
mix/ContractCallDataEncoder.cpp

@ -163,7 +163,7 @@ dev::bytes ContractCallDataEncoder::decodeBytes(dev::bytes const& _rawValue)
QString ContractCallDataEncoder::toString(dev::bytes const& _b) QString ContractCallDataEncoder::toString(dev::bytes const& _b)
{ {
QString str; QString str;
if (isString(_b, str)) if (asString(_b, str))
return "\"" + str + "\" " + QString::fromStdString(dev::toJS(_b)); return "\"" + str + "\" " + QString::fromStdString(dev::toJS(_b));
else else
return QString::fromStdString(dev::toJS(_b)); return QString::fromStdString(dev::toJS(_b));
@ -206,7 +206,7 @@ QStringList ContractCallDataEncoder::decode(QList<QVariableDeclaration*> const&
} }
bool ContractCallDataEncoder::isString(dev::bytes const& _b, QString& _str) bool ContractCallDataEncoder::asString(dev::bytes const& _b, QString& _str)
{ {
dev::bytes bunPad = unpadded(_b); dev::bytes bunPad = unpadded(_b);
for (unsigned i = 0; i < bunPad.size(); i++) for (unsigned i = 0; i < bunPad.size(); i++)

2
mix/ContractCallDataEncoder.h

@ -66,7 +66,7 @@ private:
dev::bytes encodeBytes(QString const& _str); dev::bytes encodeBytes(QString const& _str);
dev::bytes decodeBytes(dev::bytes const& _rawValue); dev::bytes decodeBytes(dev::bytes const& _rawValue);
QString toString(dev::bytes const& _b); QString toString(dev::bytes const& _b);
bool isString(dev::bytes const& _b, QString& _str); bool asString(dev::bytes const& _b, QString& _str);
private: private:
bytes m_encodedData; bytes m_encodedData;

Loading…
Cancel
Save