Cleanups.

This commit is contained in:
JoelKatz
2012-04-12 23:23:14 -07:00
parent d8a284f129
commit 9f58a4bfbf
2 changed files with 61 additions and 59 deletions

View File

@@ -167,7 +167,9 @@ std::string STAccount::getText() const
{
uint160 u;
NewcoinAddress a;
if(!getValueH160(u)) return STVariableLength::getText();
if (!getValueH160(u))
return STVariableLength::getText();
a.setAccountID(u);
return a.humanAccountPublic();
}
@@ -178,7 +180,7 @@ STAccount* STAccount::construct(SerializerIterator& u, const char *name)
if (!ret->isValueH160())
{
delete ret;
throw(std::runtime_error("invalid account in transaction"));
throw std::runtime_error("invalid account in transaction");
}
return ret;
}
@@ -221,7 +223,7 @@ STTaggedList* STTaggedList::construct(SerializerIterator& u, const char *name)
int STTaggedList::getLength() const
{
int ret = Serializer::getTaggedListLength(value);
if(ret<0) throw(std::overflow_error("bad TL length"));
if (ret<0) throw std::overflow_error("bad TL length");
return ret;
}