pvs fix warnings
git-svn-id: svn://db.shs.com.ru/pip@280 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -55,7 +55,8 @@ public:
|
||||
public:
|
||||
//! Constructs data block
|
||||
RawData(void * data = 0, int size = 0) {d = data; s = size;}
|
||||
//! Constructs data block
|
||||
RawData(const RawData & o) {d = o.d; s = o.s;}
|
||||
//! Constructs data block
|
||||
RawData(const void * data, const int size) {d = const_cast<void * >(data); s = size;}
|
||||
RawData & operator =(const RawData & o) {d = o.d; s = o.s; return *this;}
|
||||
private:
|
||||
|
||||
@@ -190,7 +190,7 @@ PICout PICout::operator <<(const PICoutAction v) {
|
||||
#define PINUMERICCOUT if (cnb_ == 10) PICOUTTOTARGET(v) else PICOUTTOTARGET(PIString::fromNumber(v, cnb_))
|
||||
|
||||
|
||||
PICout PICout::operator <<(const char * v) {if (v == '\0') return *this; space(); quote(); PICOUTTOTARGET(v) quote(); return *this;}
|
||||
PICout PICout::operator <<(const char * v) {if (v[0] == '\0') return *this; space(); quote(); PICOUTTOTARGET(v) quote(); return *this;}
|
||||
|
||||
PICout PICout::operator <<(const std::string & v) {space(); quote(); PICOUTTOTARGET(v) quote(); return *this;}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
//! %Rule of transition between states of machine
|
||||
struct Rule {
|
||||
//! Constuctor
|
||||
Rule() {handler = 0;}
|
||||
Rule() {handler = 0; from = to = Type(); autoTransition = resetAllConditions = false;}
|
||||
//! Constuctor
|
||||
Rule(Type f, Type t, const PIStringList & c = PIStringList(), Handler h = 0, bool at = false, bool rac = false) {
|
||||
from = f;
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
//! %State of machine
|
||||
struct State {
|
||||
//! Constuctor
|
||||
State() {handler = 0;}
|
||||
State() {handler = 0; value = Type();}
|
||||
//! Constuctor
|
||||
State(Type v, const PIString & n = "", Handler h = 0) {value = v; name = n; handler = h;}
|
||||
//! %State value
|
||||
|
||||
@@ -54,7 +54,17 @@ PIMap<PIString, __PIVariantInfo__ * > * __PIVariantInfoStorage__::map = 0;
|
||||
|
||||
|
||||
PIVariant::PIVariant() {
|
||||
_type = PIVariant::pivInvalid;
|
||||
_type = PIVariant::pivInvalid;
|
||||
_info = 0;
|
||||
}
|
||||
|
||||
|
||||
PIVariant::PIVariant(const PIVariant &v) {
|
||||
_type = v._type;
|
||||
_content = v._content;
|
||||
#ifdef CUSTOM_PIVARIANT
|
||||
_info = v._info;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -162,6 +162,8 @@ public:
|
||||
//! Empty constructor, \a type() will be set to \a Invalid
|
||||
PIVariant();
|
||||
|
||||
PIVariant(const PIVariant & v);
|
||||
|
||||
//! Constructs variant from string
|
||||
PIVariant(const char * v) {initType(PIString(v));}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user