git-svn-id: svn://db.shs.com.ru/pip@832 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Return resized byte array
|
//! Return resized byte array
|
||||||
PIByteArray resized(int new_size) const {PIByteArray tv(*this); tv.resize(new_size); return tv;}
|
PIByteArray resized(int new_size) const {PIByteArray ret; ret.resize(new_size); memcpy(ret.data(), data(), new_size); return ret;}
|
||||||
|
|
||||||
//! Convert data to Base 64 and return this byte array
|
//! Convert data to Base 64 and return this byte array
|
||||||
PIByteArray & convertToBase64();
|
PIByteArray & convertToBase64();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
# define piCout if (piDebug) PICout()
|
# define piCout if (piDebug) PICout()
|
||||||
# define piCoutObj if (piDebug && debug()) PICout() << "" << (PIString("[") + className() + " \"" + name() + "\"]")
|
# define piCoutObj if (piDebug && debug()) PICout() << "" << (PIStringAscii("[") + className() + " \"" + name() + "\"]")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1116,13 +1116,15 @@ PICout operator <<(PICout s, const PIString & v) {
|
|||||||
s.setControl(0, true);
|
s.setControl(0, true);
|
||||||
if (PICout::isBufferActive())
|
if (PICout::isBufferActive())
|
||||||
s << v.data();
|
s << v.data();
|
||||||
else
|
else {
|
||||||
s <<
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
(const char*)v.toByteArray().data();
|
PIByteArray d = v.toByteArray();
|
||||||
|
d.push_back(uchar('\0'));
|
||||||
|
s << (const char*)d.data();
|
||||||
#else
|
#else
|
||||||
v.dataConsole();
|
s << v.dataConsole();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
s.restoreControl();
|
s.restoreControl();
|
||||||
s.quote();
|
s.quote();
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
Reference in New Issue
Block a user