Unverified Commit 7776cfea authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] fixed cpplint warnings about braces (#2869)

* [ci] fixed cpplint warnings about braces

* removed excess line
parent c319474f
......@@ -134,7 +134,6 @@ class Tree {
inline int PredictLeafIndex(const double* feature_values) const;
inline int PredictLeafIndexByMap(const std::unordered_map<int, double>& feature_values) const;
inline void PredictContrib(const double* feature_values, int num_features, double* output);
/*! \brief Get Number of leaves*/
......@@ -151,7 +150,6 @@ class Tree {
/*! \brief Get the number of data points that fall at or below this node*/
inline int data_count(int node) const { return node >= 0 ? internal_count_[node] : leaf_count_[~node]; }
/*!
* \brief Shrinkage for the tree's output
* shrinkage rate (a.k.a learning rate) is used to tune the training process
......
......@@ -170,11 +170,9 @@ std::unique_ptr<VirtualFileReader> VirtualFileReader::Make(
if (0 == filename.find(kHdfsProto)) {
WITH_HDFS(return std::unique_ptr<VirtualFileReader>(
new HDFSFile(filename, O_RDONLY)));
} else
}
#endif
{
return std::unique_ptr<VirtualFileReader>(new LocalFile(filename, "rb"));
}
}
std::unique_ptr<VirtualFileWriter> VirtualFileWriter::Make(
......@@ -183,23 +181,19 @@ std::unique_ptr<VirtualFileWriter> VirtualFileWriter::Make(
if (0 == filename.find(kHdfsProto)) {
WITH_HDFS(return std::unique_ptr<VirtualFileWriter>(
new HDFSFile(filename, O_WRONLY)));
} else
}
#endif
{
return std::unique_ptr<VirtualFileWriter>(new LocalFile(filename, "wb"));
}
}
bool VirtualFileWriter::Exists(const std::string& filename) {
#ifdef USE_HDFS
if (0 == filename.find(kHdfsProto)) {
WITH_HDFS(HDFSFile file(filename, O_RDONLY); return file.Exists());
} else
}
#endif
{
LocalFile file(filename, "rb");
return file.Exists();
}
}
} // namespace LightGBM
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