revert 'loplugin:flatten in sc' in sc/source/core/opencl

I have patches rewriting this code to be much cleaner, so this
won't be necessary and it makes it hard to rebase those patches.
Also at least the CheckVariables::CheckSubArgumentIsNan() change
actually makes the code worse.

Change-Id: I5d63c158c6883200e2c6e03d02e00f6672d6a1af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139048
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
Luboš Luňák
2022-08-31 09:14:34 +02:00
parent fd72a87868
commit 0fe3863a4e
2 changed files with 545 additions and 542 deletions
File diff suppressed because it is too large Load Diff
+16 -15
View File
@@ -252,22 +252,23 @@ void CheckVariables::CheckSubArgumentIsNan( std::stringstream& ss,
ss << vSubArguments[i]->GenSlidingWindowDeclRef();
ss << ";\n";
}
if (vSubArguments[i]->GetFormulaToken()->GetType() != formula::svDouble &&
vSubArguments[i]->GetFormulaToken()->GetOpCode() == ocPush)
return;
if (vSubArguments[i]->GetFormulaToken()->GetType() == formula::svDouble ||
vSubArguments[i]->GetFormulaToken()->GetOpCode() != ocPush)
{
ss << " if(";
ss << "isnan(";
ss << vSubArguments[i]->GenSlidingWindowDeclRef();
ss << "))\n";
ss << " tmp";
ss << i;
ss << "=0;\n else \n";
ss << " tmp";
ss << i;
ss << "=";
ss << vSubArguments[i]->GenSlidingWindowDeclRef();
ss << ";\n";
ss << " if(";
ss << "isnan(";
ss << vSubArguments[i]->GenSlidingWindowDeclRef();
ss << "))\n";
ss << " tmp";
ss << i;
ss << "=0;\n else \n";
ss << " tmp";
ss << i;
ss << "=";
ss << vSubArguments[i]->GenSlidingWindowDeclRef();
ss << ";\n";
}
}