Use buffer in STBlob

This commit is contained in:
seelabs
2015-03-12 11:54:15 -07:00
committed by Tom Ritchford
parent 8ca9fa1c26
commit 803f5b5613
10 changed files with 102 additions and 77 deletions

View File

@@ -25,21 +25,21 @@ namespace ripple {
STBlob::STBlob (SerialIter& st, SField::ref name)
: STBase (name)
, value_ (st.getVLBuffer ())
{
value = st.getVL ();
}
std::string
STBlob::getText () const
{
return strHex (value);
return strHex (value_.data (), value_.size ());
}
bool
STBlob::isEquivalent (const STBase& t) const
{
const STBlob* v = dynamic_cast<const STBlob*> (&t);
return v && (value == v->value);
return v && (value_ == v->value_);
}
} // ripple