Skip to content

Commit

Permalink
fixed cpplint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS committed Apr 4, 2020
1 parent 15250df commit 62d5373
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/LightGBM/utils/openmp_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/io/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/lightgbm_R.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>

#include <R_ext/Rdynload.h>

#include <string>
#include <cstdio>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>

#include <R_ext/Rdynload.h>

#define COL_MAJOR (0)

#define R_API_BEGIN() \
Expand Down

0 comments on commit 62d5373

Please sign in to comment.