picout fix
This commit is contained in:
@@ -160,6 +160,7 @@ PICout::PICout(int controls): fo_(true), cc_(false), fc_(false), act_(true), cnb
|
||||
}
|
||||
|
||||
PICout::PICout(bool active): fo_(true), cc_(false), fc_(false), act_(active), cnb_(10), co_(PICoutManipulators::DefaultControls) {
|
||||
buffer_ = nullptr;
|
||||
if (act_)
|
||||
init();
|
||||
}
|
||||
@@ -522,6 +523,7 @@ PICout & PICout::newLine() {
|
||||
|
||||
|
||||
PICout & PICout::write(const char * str, int len) {
|
||||
if (!act_) return *this;
|
||||
if (buffer_) {
|
||||
buffer_->append(PIString(str, len));
|
||||
} else {
|
||||
@@ -533,6 +535,7 @@ PICout & PICout::write(const char * str, int len) {
|
||||
|
||||
|
||||
PICout & PICout::writePIString(const PIString & s) {
|
||||
if (!act_) return *this;
|
||||
if (buffer_) {
|
||||
buffer_->append(s);
|
||||
} else {
|
||||
@@ -555,7 +558,7 @@ void PICout::init() {
|
||||
}
|
||||
attr_ = __Private__::dattr;
|
||||
#endif
|
||||
buffer_ = 0;
|
||||
buffer_ = nullptr;
|
||||
id_ = 0;
|
||||
if ((co_ & NoLock) != NoLock)
|
||||
PICout::__mutex__().lock();
|
||||
|
||||
Reference in New Issue
Block a user