@@ -16,7 +16,7 @@ void PlainTreeFiller::AddBranch(const std::string& branch_name) {
1616}
1717
1818void PlainTreeFiller::SetFieldsToIgnore (const std::vector<std::string>& fields_to_ignore) {
19- if (branch_name_ == " " ) {
19+ if (branch_name_. empty () ) {
2020 throw std::runtime_error (" PlainTreeFiller::SetFieldsToIgnore() must be called after PlainTreeFiller::AddBranch()\n " );
2121 }
2222 for (auto & fti : fields_to_ignore) {
@@ -25,7 +25,7 @@ void PlainTreeFiller::SetFieldsToIgnore(const std::vector<std::string>& fields_t
2525}
2626
2727void PlainTreeFiller::SetFieldsToPreserve (const std::vector<std::string>& fields_to_preserve) {
28- if (branch_name_ == " " ) {
28+ if (branch_name_. empty () ) {
2929 throw std::runtime_error (" PlainTreeFiller::SetFieldsToPreserve() must be called after PlainTreeFiller::AddBranch()\n " );
3030 }
3131 for (auto & fti : fields_to_preserve) {
@@ -44,7 +44,7 @@ void PlainTreeFiller::Init() {
4444 if (me.second .id_ < 0 ) defaultFieldsNames.emplace_back (me.first );
4545 }
4646 }
47- SetFieldsToIgnore (std::move ( defaultFieldsNames) );
47+ SetFieldsToIgnore (defaultFieldsNames);
4848 }
4949
5050 if (!fields_to_ignore_.empty () && !fields_to_preserve_.empty ()) {
@@ -55,17 +55,17 @@ void PlainTreeFiller::Init() {
5555 const auto & branch_config = config_->GetBranchConfig (branch_name_);
5656 for (const auto & field : branch_config.GetMap <float >()) {
5757 AnalysisTask::AddEntry (AnalysisEntry ({Variable (branch_name_, field.first )}));
58- vars_.emplace_back (FIB () );
58+ vars_.emplace_back ();
5959 vars_.back ().type_ = Types::kFloat ;
6060 }
6161 for (const auto & field : branch_config.GetMap <int >()) {
6262 AnalysisTask::AddEntry (AnalysisEntry ({Variable (branch_name_, field.first )}));
63- vars_.emplace_back (FIB () );
63+ vars_.emplace_back ();
6464 vars_.back ().type_ = Types::kInteger ;
6565 }
6666 for (const auto & field : branch_config.GetMap <bool >()) {
6767 AnalysisTask::AddEntry (AnalysisEntry ({Variable (branch_name_, field.first )}));
68- vars_.emplace_back (FIB () );
68+ vars_.emplace_back ();
6969 vars_.back ().type_ = Types::kBool ;
7070 }
7171 }
0 commit comments