Commit: 85f809ca3902c3eee136e4c18fabd83e1397f422
Author: Ankit Meel
Date: Tue Oct 6 22:32:55 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB85f809ca3902c3eee136e4c18fabd83e1397f422
Remove writer's destructor to .cc file
===================================================================
M source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
M source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
===================================================================
diff --git a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
index 3d7c9301a5f..050ddf1e0a1 100644
--- a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
+++ b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
@@ -120,6 +120,14 @@ void OBJWriter::write_vert_indices(Span<int> vert_indices,
Span<int>, Span<int>)
fputs("\n", outfile_);
}
+OBJWriter::~OBJWriter()
+{
+ if (outfile_ && fclose(outfile_)) {
+ std::cerr << "Error: could not close the OBJ file properly, file may be
corrupted."
+ << std::endl;
+ }
+}
+
/**
* Try to open the OBJ file and write file header.
* \return Whether the destination file is writable.
diff --git a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
index fd8801bbcce..f72da42e3a8 100644
--- a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
+++ b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
@@ -60,13 +60,7 @@ class OBJWriter {
OBJWriter(const OBJExportParams &export_params) :
export_params_(export_params)
{
}
- ~OBJWriter()
- {
- if (outfile_ && fclose(outfile_)) {
- std::cerr << "Error: could not close the OBJ file properly, file may be
corrupted."
- << std::endl;
- }
- }
+ ~OBJWriter();
bool init_writer(const char *filepath);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs