"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "2e9c2be54a40348e02f1d1e16e90f8db62aaf58c"
Unverified Commit fb37e507 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

Remove leftovers after the drop of Solaris support (#5248)

* Update tree.cpp

* Update common.h

* Update common.h
parent 23da5fc5
...@@ -29,11 +29,9 @@ ...@@ -29,11 +29,9 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#if (!((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))))
#define FMT_HEADER_ONLY #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/fast_double_parser/include/fast_double_parser.h"
#include "../../../external_libs/fmt/include/fmt/format.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#include <intrin.h> #include <intrin.h>
...@@ -1192,7 +1190,6 @@ inline static std::vector<T> StringToArray(const std::string& str, char delimite ...@@ -1192,7 +1190,6 @@ inline static std::vector<T> StringToArray(const std::string& str, char delimite
return ret; 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. * 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<T>& arr, size_t n) { ...@@ -1257,7 +1254,6 @@ inline static std::string ArrayToString(const std::vector<T>& arr, size_t n) {
} }
return str_buf.str(); return str_buf.str();
} }
#endif // (!((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))))
} // namespace CommonC } // namespace CommonC
......
...@@ -340,11 +340,7 @@ std::string Tree::ToString() const { ...@@ -340,11 +340,7 @@ std::string Tree::ToString() const {
std::stringstream str_buf; std::stringstream str_buf;
Common::C_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; using CommonC::ArrayToString;
#endif
str_buf << "num_leaves=" << num_leaves_ << '\n'; str_buf << "num_leaves=" << num_leaves_ << '\n';
str_buf << "num_cat=" << num_cat_ << '\n'; str_buf << "num_cat=" << num_cat_ << '\n';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment