Fix clang-tidy warnings. (#4149)
* Upgrade gtest for clang-tidy. * Use CMake to install GTest instead of mv. * Don't enforce clang-tidy to return 0 due to errors in thrust. * Add a small test for tidy itself. * Reformat.
This commit is contained in:
@@ -87,7 +87,10 @@ class Booster {
|
||||
initialized_ = true;
|
||||
}
|
||||
|
||||
public:
|
||||
bool IsInitialized() const { return initialized_; }
|
||||
void Intialize() { initialized_ = true; }
|
||||
|
||||
private:
|
||||
bool configured_;
|
||||
bool initialized_;
|
||||
std::unique_ptr<Learner> learner_;
|
||||
@@ -1153,7 +1156,7 @@ XGB_DLL int XGBoosterLoadRabitCheckpoint(BoosterHandle handle,
|
||||
auto* bst = static_cast<Booster*>(handle);
|
||||
*version = rabit::LoadCheckPoint(bst->learner());
|
||||
if (*version != 0) {
|
||||
bst->initialized_ = true;
|
||||
bst->Intialize();
|
||||
}
|
||||
API_END();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user