Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream

This commit is contained in:
wmayer
2022-08-21 12:46:53 +02:00
parent 5be214b885
commit 5014bab534
13 changed files with 60 additions and 31 deletions

View File

@@ -29,6 +29,7 @@
#include <Base/VectorPy.h>
#include <Base/FileInfo.h>
#include <Base/Interpreter.h>
#include <Base/Stream.h>
#include <App/Document.h>
#include <App/DocumentObjectPy.h>
#include <App/Application.h>
@@ -163,7 +164,7 @@ namespace Path {
if (obj->getTypeId().isDerivedFrom(Base::Type::fromName("Path::Feature"))) {
const Toolpath& path = static_cast<Path::Feature*>(obj)->Path.getValue();
std::string gcode = path.toGCode();
std::ofstream ofile(EncodedName.c_str());
Base::ofstream ofile(file);
ofile << gcode;
ofile.close();
}
@@ -199,7 +200,7 @@ namespace Path {
try {
// read the gcode file
std::ifstream filestr(file.filePath().c_str());
Base::ifstream filestr(file);
std::stringstream buffer;
buffer << filestr.rdbuf();
std::string gcode = buffer.str();