|
From: <le...@us...> - 2007-01-12 18:32:50
|
Revision: 156
http://svn.sourceforge.net/qcell/?rev=156&view=rev
Author: lessm
Date: 2007-01-12 10:32:47 -0800 (Fri, 12 Jan 2007)
Log Message:
-----------
- LocalFunction have some changes
Modified Paths:
--------------
trunk/qcell/basesources/LocalFunction.cpp
trunk/qcell/parsers/FQT/FQTParserPlugin.cpp
Modified: trunk/qcell/basesources/LocalFunction.cpp
===================================================================
--- trunk/qcell/basesources/LocalFunction.cpp 2007-01-12 18:08:16 UTC (rev 155)
+++ trunk/qcell/basesources/LocalFunction.cpp 2007-01-12 18:32:47 UTC (rev 156)
@@ -86,6 +86,8 @@
QVector<int> out;
foreach(index, freeArguments)
{
+ if(index>=args.size())
+ index = args.size() -1;
tmp = args[index];
if(tmp>=getAlphabetSize())
tmp = getAlphabetSize()-1;
@@ -511,7 +513,7 @@
int LocalFunction::resolve(QVector<int> args)
{
- int i, index = 0, temp;
+ int index = 0;
if(valueTable.empty())
resizeValueTable();
if(functionMode==LocalFunction::SCRIPT)
Modified: trunk/qcell/parsers/FQT/FQTParserPlugin.cpp
===================================================================
--- trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-01-12 18:08:16 UTC (rev 155)
+++ trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-01-12 18:32:47 UTC (rev 156)
@@ -275,7 +275,7 @@
foreach(int sum, results.keys())
{
for(int i=0;i<results.value(sum).size();++i)
- lf.setFunctionValue((results.value(sum))[i], sum, i);
+ lf.setFunctionValue((results.value(sum))[results.value(sum).size() - i - 1], sum, i);
}
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|