Unverified Commit d84e9a2e authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

fixed cpplint errors (#2971)

parent 15250df8
......@@ -6,9 +6,10 @@
#define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP
#include <omp.h>
#include <LightGBM/utils/log.h>
#include <omp.h>
#include <exception>
#include <memory>
#include <mutex>
......
......@@ -71,7 +71,7 @@ int Tree::SplitCategorical(int leaf, int feature, int real_feature, const uint32
int new_node_idx = num_leaves_ - 1;
decision_type_[new_node_idx] = 0;
SetDecisionType(&decision_type_[new_node_idx], true, kCategoricalMask);
SetMissingType(&decision_type_[new_node_idx], missing_type);
SetMissingType(&decision_type_[new_node_idx], missing_type);
threshold_in_bin_[new_node_idx] = num_cat_;
threshold_[new_node_idx] = num_cat_;
++num_cat_;
......@@ -335,7 +335,7 @@ std::string Tree::NumericalDecisionIfElse(int node) const {
std::stringstream str_buf;
uint8_t missing_type = GetMissingType(decision_type_[node]);
bool default_left = GetDecisionType(decision_type_[node], kDefaultLeftMask);
if (missing_type == MissingType::None
if (missing_type == MissingType::None
|| (missing_type == MissingType::Zero && default_left && kZeroThreshold < threshold_[node])) {
str_buf << "if (fval <= " << threshold_[node] << ") {";
} else if (missing_type == MissingType::Zero) {
......
......@@ -9,6 +9,8 @@
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <R_ext/Rdynload.h>
#include <string>
#include <cstdio>
#include <cstring>
......@@ -16,8 +18,6 @@
#include <utility>
#include <vector>
#include <R_ext/Rdynload.h>
#define COL_MAJOR (0)
#define R_API_BEGIN() \
......
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