PIByteArray rvalue, some fixes
This commit is contained in:
@@ -56,6 +56,10 @@ public:
|
||||
//! Constructs an empty byte array
|
||||
PIByteArray() {;}
|
||||
|
||||
PIByteArray(const PIByteArray & o): PIDeque<uchar>(o) {}
|
||||
|
||||
PIByteArray(PIByteArray && o): PIDeque<uchar>(std::move(o)) {}
|
||||
|
||||
//! Constructs 0-filled byte array with size "size"
|
||||
PIByteArray(const uint size) {resize(size);}
|
||||
|
||||
@@ -124,6 +128,10 @@ public:
|
||||
|
||||
void operator =(const PIDeque<uchar> & d) {resize(d.size()); memcpy(data(), d.data(), d.size());}
|
||||
|
||||
PIByteArray & operator =(const PIByteArray & o) {if (this == &o) return *this; clear(); append(o); return *this;}
|
||||
|
||||
PIByteArray & operator =(PIByteArray && o) {swap(o); return *this;}
|
||||
|
||||
static PIByteArray fromUserInput(PIString str);
|
||||
static PIByteArray fromHex(PIString str);
|
||||
static PIByteArray fromBase64(const PIByteArray & base64);
|
||||
|
||||
Reference in New Issue
Block a user