pvs fix warnings

git-svn-id: svn://db.shs.com.ru/pip@280 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2016-11-07 13:07:46 +00:00
parent bf2f224eb9
commit a393f93ee1
21 changed files with 84 additions and 64 deletions

View File

@@ -775,7 +775,6 @@ int PIEvaluator::parse(const PIString & string, int offset) {
bcnt = farg = 1;
///qDebug() << "function: " + cfunc.identifier;
//for (int k = 0; k < facnt; k++) {
bcnt = 1;
carg = "";
k = i + 1;
//if (string.size_s() <= k || k < 0) return -666;

View File

@@ -49,7 +49,7 @@ namespace PIEvaluatorTypes {
};
struct Instruction {
Instruction() {;}
Instruction() {out = -1; function = -1; operation = oNone;}
Instruction(Operation oper, PIVector<int> opers, int out_ind, int func = -1) {
operation = oper; operators = opers; out = out_ind; function = func;}
Operation operation;
@@ -58,7 +58,7 @@ namespace PIEvaluatorTypes {
int function;
};
struct Element {
Element() {;}
Element() {num = 0; var_num = -1; type = etNumber;}
Element(eType new_type, int new_num, int new_var_num = -1) {set(new_type, new_num, new_var_num);}
void set(eType new_type, int new_num, int new_var_num = -1) {type = new_type; num = new_num; var_num = new_var_num;}
eType type;

View File

@@ -41,7 +41,7 @@ public:
fp & operator =(const float &v) {val = PIFixedPoint(v).val; return *this;}
fp & operator =(const double &v) {val = PIFixedPoint(v).val; return *this;}
fp & operator =(const long double &v) {val = PIFixedPoint(v).val; return *this;}
fp & operator -() {fp p = fp(*this); p.val = -val; return p;}
fp operator -() {fp p = fp(*this); p.val = -val; return p;}
bool operator ==(const fp & v) const {return val == v.val;}
bool operator !=(const fp & v) const {return val != v.val;}