Skip to content

Commit

Permalink
Remove leftovers after the drop of Solaris support (#5248)
Browse files Browse the repository at this point in the history
* Update tree.cpp

* Update common.h

* Update common.h
  • Loading branch information
StrikerRUS authored May 29, 2022
1 parent 23da5fc commit fb37e50
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions include/LightGBM/utils/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
#include <utility>
#include <vector>

#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 <intrin.h>
Expand Down Expand Up @@ -1192,7 +1190,6 @@ inline static std::vector<T> 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.
*
Expand Down Expand Up @@ -1257,7 +1254,6 @@ inline static std::string ArrayToString(const std::vector<T>& arr, size_t n) {
}
return str_buf.str();
}
#endif // (!((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))))


} // namespace CommonC
Expand Down
4 changes: 0 additions & 4 deletions src/io/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit fb37e50

Please sign in to comment.