From dc4692e0989ebab0441513933e2ea1bac2eabb72 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Mon, 5 Apr 2021 23:27:29 -0500 Subject: [PATCH] Avoid name collisions for log_t types --- src/libslic3r/Log.cpp | 6 +++--- src/libslic3r/Log.hpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/Log.cpp b/src/libslic3r/Log.cpp index 8cde37fc4..dcc56c1e2 100644 --- a/src/libslic3r/Log.cpp +++ b/src/libslic3r/Log.cpp @@ -8,7 +8,7 @@ #include #include -#include "Log.hpp" +#include "libslic3r/Log.hpp" /// Local class to suppress output class NullStream : public std::streambuf @@ -164,7 +164,7 @@ std::ostream& _Log::debug(const char topic[], bool multiline) { } std::ostream& _Log::debug(const std::string& topic, bool multiline) { - if (this->_has_log_level(log_t::DEBUG) && this->_has_topic(topic)) { + if (this->_has_log_level(log_t::DBG) && this->_has_topic(topic)) { if (!multiline) _out << topic << std::setfill(' ') << std::setw(6) << "DEBUG" << ": "; return _out; @@ -199,7 +199,7 @@ void _Log::set_level(log_t level) { this->_log_level.insert(log_t::ERR); this->_log_level.insert(log_t::WARN); this->_log_level.insert(log_t::INFO); - this->_log_level.insert(log_t::DEBUG); + this->_log_level.insert(log_t::DBG); } else { this->_log_level.insert(level); } diff --git a/src/libslic3r/Log.hpp b/src/libslic3r/Log.hpp index 6a7ed19ba..39ba7f7c3 100644 --- a/src/libslic3r/Log.hpp +++ b/src/libslic3r/Log.hpp @@ -8,11 +8,10 @@ #include #include - namespace Slic3r { /// All available logging levels. -enum class log_t : uint8_t { FERR = 0, ERR = 4, WARN = 8, INFO = 16, DEBUG = 32, ALL = 255 }; +enum class log_t : uint8_t { FERR = 0, ERR = 4, WARN = 8, INFO = 16, DBG = 32, ALL = 255 }; inline bool operator>(const log_t lhs, const log_t rhs) { return static_cast(lhs) > static_cast(rhs); } inline bool operator<(const log_t lhs, const log_t rhs) { return static_cast(lhs) < static_cast(rhs); }