Remove workaround for fixed known errors

parent c61ce784
Pipeline #62233 passed with stages
in 6 minutes and 13 seconds
......@@ -9,7 +9,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-middleware-generator</artifactId>
<version>0.0.4-SNAPSHOT</version>
<version>0.0.5-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......@@ -17,8 +17,7 @@
<!-- .. SE-Libraries .................................................. -->
<se-commons.version>1.7.7</se-commons.version>
<Embedded-MontiArc-Math.version>0.0.15-SNAPSHOT</Embedded-MontiArc-Math.version>
<Embedded-montiarc-math-generator.version>0.0.17-SNAPSHOT</Embedded-montiarc-math-generator.version>
<Embedded-montiarc-math-generator.version>0.0.18-SNAPSHOT</Embedded-montiarc-math-generator.version>
<Embedded-montiarc-math-roscpp-generator.version>0.0.4-SNAPSHOT</Embedded-montiarc-math-roscpp-generator.version>
<Embedded-montiarc-math-rosmsg-generator.version>0.0.3-SNAPSHOT</Embedded-montiarc-math-rosmsg-generator.version>
<!-- .. Libraries .................................................. -->
......@@ -90,12 +89,6 @@
<version>${se-commons.version}</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math</artifactId>
<version>${Embedded-MontiArc-Math.version}</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
......
......@@ -9,15 +9,9 @@ import de.monticore.lang.tagging._symboltable.TaggingResolver;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
//TODO: make GeneratorCpp implement GeneratorImpl directly!
public class CPPGenImpl implements GeneratorImpl {
private String generationTargetPath;
private GeneratorCPP generatorCPP;
......@@ -39,8 +33,6 @@ public class CPPGenImpl implements GeneratorImpl {
files.add(generatorCPP.generateFile(generateCMake(componentInstanceSymbol)));
files.addAll(generatorCPP.generateFiles(componentInstanceSymbol, taggingResolver));
fixKnownErrors(files);
return files;
}
......@@ -56,21 +48,4 @@ public class CPPGenImpl implements GeneratorImpl {
cmake.setFileContent(TemplateHelper.getCmakeCppTemplate().replace("${compName}", name));
return cmake;
}
private void fixKnownErrors(List<File> files) throws IOException {
for (File f : files) {
Path path = Paths.get(f.getAbsolutePath());
Charset charset = StandardCharsets.UTF_8;
String content = new String(Files.readAllBytes(path), charset);
content = content
//Matrix access problems
.replace("int curIndex = indexLookup(i);","int curIndex = indexLookup(i-1);")
.replace("-1-1", "-1") //not present in emam2cpp master
.replace("] ;","];")
;
Files.write(path, content.getBytes(charset));
}
}
}
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