Remove unused CDataStream methods

pull/20464/head
MarcoFalke 4 years ago
parent 555b5d1bf9
commit faa96f841f
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -264,19 +264,6 @@ public:
nVersion = nVersionIn; nVersion = nVersionIn;
} }
CDataStream& operator+=(const CDataStream& b)
{
vch.insert(vch.end(), b.begin(), b.end());
return *this;
}
friend CDataStream operator+(const CDataStream& a, const CDataStream& b)
{
CDataStream ret = a;
ret += b;
return (ret);
}
std::string str() const std::string str() const
{ {
return (std::string(begin(), end())); return (std::string(begin(), end()));
@ -462,11 +449,6 @@ public:
return (*this); return (*this);
} }
void GetAndClear(CSerializeData &d) {
d.insert(d.end(), begin(), end());
clear();
}
/** /**
* XOR the contents of this stream with a certain key. * XOR the contents of this stream with a certain key.
* *

@ -342,11 +342,6 @@ BOOST_AUTO_TEST_CASE(insert_delete)
BOOST_CHECK_EQUAL(ss[1], 1); BOOST_CHECK_EQUAL(ss[1], 1);
BOOST_CHECK_EQUAL(ss[2], 2); BOOST_CHECK_EQUAL(ss[2], 2);
BOOST_CHECK_EQUAL(ss[3], (char)0xff); BOOST_CHECK_EQUAL(ss[3], (char)0xff);
// Make sure GetAndClear does the right thing:
CSerializeData d;
ss.GetAndClear(d);
BOOST_CHECK_EQUAL(ss.size(), 0U);
} }
BOOST_AUTO_TEST_CASE(class_methods) BOOST_AUTO_TEST_CASE(class_methods)

Loading…
Cancel
Save