Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-12-12 21:13:33 +0300
committerbubnikv <bubnikv@gmail.com>2016-12-12 21:13:33 +0300
commit06540f73f742da98986c1390a9c3ce0b141cbb24 (patch)
tree323f505873573f88acc295ec561a8454df72ddd7 /xs
parentce7717e4506c35a0eddc8876c188663d014c85e8 (diff)
Try to fix compilation problems due to Perl crazy macros.
Diffstat (limited to 'xs')
-rw-r--r--xs/src/libslic3r/utils.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp
index 0f298e954..b66d58489 100644
--- a/xs/src/libslic3r/utils.cpp
+++ b/xs/src/libslic3r/utils.cpp
@@ -1,3 +1,30 @@
+#include <boost/log/core.hpp>
+#include <boost/log/trivial.hpp>
+#include <boost/log/expressions.hpp>
+
+namespace Slic3r {
+
+static boost::log::trivial::severity_level logSeverity = boost::log::trivial::fatal;
+
+void set_logging_level(unsigned int level)
+{
+ switch (level) {
+ case 0: logSeverity = boost::log::trivial::fatal; break;
+ case 1: logSeverity = boost::log::trivial::error; break;
+ case 2: logSeverity = boost::log::trivial::warning; break;
+ case 3: logSeverity = boost::log::trivial::info; break;
+ case 4: logSeverity = boost::log::trivial::debug; break;
+ default: logSeverity = boost::log::trivial::trace; break;
+ }
+
+ boost::log::core::get()->set_filter
+ (
+ boost::log::trivial::severity >= logSeverity
+ );
+}
+
+} // namespace Slic3r
+
#ifdef SLIC3R_HAS_BROKEN_CROAK
// Some Strawberry Perl builds (mainly the latest 64bit builds) have a broken mechanism
@@ -66,30 +93,3 @@ confess_at(const char *file, int line, const char *func,
}
#endif
-
-#include <boost/log/core.hpp>
-#include <boost/log/trivial.hpp>
-#include <boost/log/expressions.hpp>
-
-namespace Slic3r {
-
-static boost::log::trivial::severity_level logSeverity = boost::log::trivial::fatal;
-
-void set_logging_level(unsigned int level)
-{
- switch (level) {
- case 0: logSeverity = boost::log::trivial::fatal; break;
- case 1: logSeverity = boost::log::trivial::error; break;
- case 2: logSeverity = boost::log::trivial::warning; break;
- case 3: logSeverity = boost::log::trivial::info; break;
- case 4: logSeverity = boost::log::trivial::debug; break;
- default: logSeverity = boost::log::trivial::trace; break;
- }
-
- boost::log::core::get()->set_filter
- (
- boost::log::trivial::severity >= logSeverity
- );
-}
-
-} // namespace Slic3r