From aa00da1b7e0bdceee4a2c2ae14cd48ab73df3dfc Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Tue, 8 Nov 2022 13:27:02 +0100 Subject: [PATCH] Add log for not openable font file --- src/libslic3r/Emboss.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index 8716936362..0bd06cf8dc 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -778,20 +778,20 @@ std::unique_ptr Emboss::create_font_file(const char *file_path FILE *file = fopen(file_path, "rb"); if (file == nullptr) { assert(false); - // BOOST_LOG_TRIVIAL(error) << "Couldn't open " << file_path << " for reading." << std::endl; + BOOST_LOG_TRIVIAL(error) << "Couldn't open " << file_path << " for reading."; return nullptr; } // find size of file if (fseek(file, 0L, SEEK_END) != 0) { assert(false); - // BOOST_LOG_TRIVIAL(error) << "Couldn't fseek file " << file_path << " for size measure." << std::endl; + BOOST_LOG_TRIVIAL(error) << "Couldn't fseek file " << file_path << " for size measure."; return nullptr; } size_t size = ftell(file); if (size == 0) { assert(false); - // BOOST_LOG_TRIVIAL(error) << "Size of font file is zero. Can't read." << std::endl; + BOOST_LOG_TRIVIAL(error) << "Size of font file is zero. Can't read."; return nullptr; } rewind(file); @@ -799,7 +799,7 @@ std::unique_ptr Emboss::create_font_file(const char *file_path size_t count_loaded_bytes = fread((void *) &buffer->front(), 1, size, file); if (count_loaded_bytes != size) { assert(false); - // BOOST_LOG_TRIVIAL(error) << "Different loaded(from file) data size." << std::endl; + BOOST_LOG_TRIVIAL(error) << "Different loaded(from file) data size."; return nullptr; } return create_font_file(std::move(buffer));