git-svn-id: svn://db.shs.com.ru/pip@649 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2018-10-17 12:55:40 +00:00
parent 74a0743045
commit b8db3b5010
5 changed files with 19 additions and 11 deletions

View File

@@ -863,7 +863,7 @@ int PIEvaluator::parse(const PIString & string, int offset) {
if (args.size_s() > 0) return args.back();
else return -666;
}
for (int i = 0; i < PIEvaluatorTypes::operationCount; i++) {
for (int i = 0; i < PIEvaluatorTypes::oOperatorsCount; i++) {
coper = operationInOrder(i);
for (int j = 0; j < opers.size_s(); j++) {
if (coper == PIEvaluatorTypes::oDivide || coper == PIEvaluatorTypes::oMultiply) {
@@ -1016,7 +1016,7 @@ inline complexd PIEvaluator::residue(const complexd & f, const complexd & s) {
inline void PIEvaluator::execFunction(const PIEvaluatorTypes::Instruction & ci) {
PIEvaluatorTypes::Function cfunc = content.function(ci.function);
const PIEvaluatorTypes::Function & cfunc(content.function(ci.function));
int oi = -ci.out - 1;
complexd tmp, stmp, ttmp;
//qDebug() << "function " << (int)cfunc.type;
@@ -1181,13 +1181,12 @@ inline void PIEvaluator::execFunction(const PIEvaluatorTypes::Instruction & ci)
inline bool PIEvaluator::execInstructions() {
kvars = &(content.variables);
PIEvaluatorTypes::Instruction ci;
int oi;
complexd tmp;
tmpvars = variables;
//cout << "var count " << tmpvars.size_s() << endl;
for (int i = 0; i < instructions.size_s(); i++) {
ci = instructions[i];
const PIEvaluatorTypes::Instruction & ci(instructions[i]);
oi = -ci.out - 1;
//cout << value(ci.operators[0]) << operationChar(ci.operation) << value(ci.operators[1]) << ", " << oi << endl;
switch (ci.operation) {
@@ -1241,6 +1240,7 @@ inline bool PIEvaluator::execInstructions() {
case PIEvaluatorTypes::oNone:
tmpvars[oi].value = value(ci.operators[0]);
break;
default: break;
}
}
if (!instructions.isEmpty())