Unverified Commit 9f78ccee authored by maskedcoder1337's avatar maskedcoder1337 Committed by GitHub
Browse files

move LightGBM-vendored json11 into a LightGBM-specific namespace (fixes #5944) (#5946)

parent 8de30d7b
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11_internal_lightgbm::Json;
/*! \brief forward declaration */ /*! \brief forward declaration */
class Tree; class Tree;
......
...@@ -58,7 +58,7 @@ namespace LightGBM { ...@@ -58,7 +58,7 @@ namespace LightGBM {
namespace Common { namespace Common {
using json11::Json; using json11_internal_lightgbm::Json;
/*! /*!
* Imbues the stream with the C locale. * Imbues the stream with the C locale.
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
namespace json11 { namespace json11_internal_lightgbm {
enum JsonParse { STANDARD, COMMENTS }; enum JsonParse { STANDARD, COMMENTS };
...@@ -223,4 +223,4 @@ class JsonValue { ...@@ -223,4 +223,4 @@ class JsonValue {
virtual ~JsonValue() {} virtual ~JsonValue() {}
}; };
} // namespace json11 } // namespace json11_internal_lightgbm
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11_internal_lightgbm::Json;
/*! /*!
* \brief GBDT algorithm implementation. including Training, prediction, bagging. * \brief GBDT algorithm implementation. including Training, prediction, bagging.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11_internal_lightgbm::Json;
DatasetLoader::DatasetLoader(const Config& io_config, const PredictFunction& predict_fun, int num_class, const char* filename) DatasetLoader::DatasetLoader(const Config& io_config, const PredictFunction& predict_fun, int num_class, const char* filename)
:config_(io_config), random_(config_.data_random_seed), predict_fun_(predict_fun), num_class_(num_class) { :config_(io_config), random_(config_.data_random_seed), predict_fun_(predict_fun), num_class_(num_class) {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <cstdlib> #include <cstdlib>
#include <limits> #include <limits>
namespace json11 { namespace json11_internal_lightgbm {
static const int max_depth = 200; static const int max_depth = 200;
...@@ -160,7 +160,7 @@ class Value : public JsonValue { ...@@ -160,7 +160,7 @@ class Value : public JsonValue {
} }
const T m_value; const T m_value;
void dump(string *out) const override { json11::dump(m_value, out); } void dump(string *out) const override { json11_internal_lightgbm::dump(m_value, out); }
}; };
class JsonDouble final : public Value<Json::NUMBER, double> { class JsonDouble final : public Value<Json::NUMBER, double> {
...@@ -777,4 +777,4 @@ bool Json::has_shape(const shape &types, string *err) const { ...@@ -777,4 +777,4 @@ bool Json::has_shape(const shape &types, string *err) const {
return true; return true;
} }
} // namespace json11 } // namespace json11_internal_lightgbm
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11_internal_lightgbm::Json;
/*! /*!
* \brief GPU-based parallel learning algorithm. * \brief GPU-based parallel learning algorithm.
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11_internal_lightgbm::Json;
/*! \brief forward declaration */ /*! \brief forward declaration */
class CostEfficientGradientBoosting; class CostEfficientGradientBoosting;
......
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