From fb37e5074ad0163afd9d88366b58075899775cfa Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Sun, 29 May 2022 04:24:41 +0300 Subject: [PATCH] Remove leftovers after the drop of Solaris support (#5248) * Update tree.cpp * Update common.h * Update common.h --- include/LightGBM/utils/common.h | 6 +----- src/io/tree.cpp | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/LightGBM/utils/common.h b/include/LightGBM/utils/common.h index 128d7a7d6b4f..3125f6b9e9ca 100644 --- a/include/LightGBM/utils/common.h +++ b/include/LightGBM/utils/common.h @@ -29,11 +29,9 @@ #include #include -#if (!((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))) #define FMT_HEADER_ONLY -#include "../../../external_libs/fmt/include/fmt/format.h" -#endif #include "../../../external_libs/fast_double_parser/include/fast_double_parser.h" +#include "../../../external_libs/fmt/include/fmt/format.h" #ifdef _MSC_VER #include @@ -1192,7 +1190,6 @@ inline static std::vector StringToArray(const std::string& str, char delimite return ret; } -#if (!((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))) /*! * Safely formats a value onto a buffer according to a format string and null-terminates it. * @@ -1257,7 +1254,6 @@ inline static std::string ArrayToString(const std::vector& arr, size_t n) { } return str_buf.str(); } -#endif // (!((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))) } // namespace CommonC diff --git a/src/io/tree.cpp b/src/io/tree.cpp index ffbef0c69e20..6cd0d50b4da7 100644 --- a/src/io/tree.cpp +++ b/src/io/tree.cpp @@ -340,11 +340,7 @@ std::string Tree::ToString() const { std::stringstream str_buf; Common::C_stringstream(str_buf); - #if ((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))) - using CommonLegacy::ArrayToString; // Slower & unsafe regarding locale. - #else using CommonC::ArrayToString; - #endif str_buf << "num_leaves=" << num_leaves_ << '\n'; str_buf << "num_cat=" << num_cat_ << '\n';