mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-28 16:11:54 -05:00
Fix of recent GCode / GCodeProcessor refactoring: Don't close a FILE
twice.
This commit is contained in:
1 parent
152e236dda
commit
0da0a7b2a0
2 files changed
+23
-4
No files matched your search
+17
-3
@@ -2642,9 +2642,23 @@ std::string GCode::extrude_support(const ExtrusionEntityCollection &support_fill
|
||||
return gcode;
|
||||
}
|
||||
|
||||
bool GCode::GCodeOutputStream::is_error() const { return ::ferror(f); }
|
||||
void GCode::GCodeOutputStream::flush() { ::fflush(f); }
|
||||
void GCode::GCodeOutputStream::close() { if (f) ::fclose(f); }
|
||||
bool GCode::GCodeOutputStream::is_error() const
|
||||
{
|
||||
return ::ferror(this->f);
|
||||
}
|
||||
|
||||
void GCode::GCodeOutputStream::flush()
|
||||
{
|
||||
::fflush(this->f);
|
||||
}
|
||||
|
||||
void GCode::GCodeOutputStream::close()
|
||||
{
|
||||
if (this->f) {
|
||||
::fclose(this->f);
|
||||
this->f = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void GCode::GCodeOutputStream::write(const char *what)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user