Commit 27152df8 authored by Christoph Richter's avatar Christoph Richter
Browse files

MathFunctionFixer: Decreased cognitive complexity in fixForLoopAccess

parent 70a37d2f
......@@ -264,12 +264,9 @@ public class MathFunctionFixer {
public static boolean fixForLoopAccess(String nameToAccess, Variable variable, BluePrintCPP bluePrintCPP) {
MathCommand mathCommand = bluePrintCPP.getMathCommandRegister().getMathCommand(nameToAccess);
if (mathCommand == null) {
if (variable != null)
if (variable.getVariableType() != null)
if (variable.getVariableType().getTypeNameTargetLanguage() != null)
if (isTargetLanguageMatrixType(variable.getVariableType().getTypeNameTargetLanguage()))
return true;
if ((mathCommand == null) && (variable != null) && (variable.getVariableType() != null) && (variable.getVariableType().getTypeNameTargetLanguage() != null)) {
String type = variable.getVariableType().getTypeNameTargetLanguage();
return isTargetLanguageMatrixType(type);
}
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment