diff --git a/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx b/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx index ba8271e25b9681c8b55b378c4e01ca4638c80a6f..2ddf2cb5d276a3dbd8201ca5c75617a0ddbad67b 100644 --- a/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx +++ b/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx @@ -166,7 +166,9 @@ namespace ROOT { auto elist = std::make_unique<TEntryList>(); Long64_t entry = fEntryList.GetEntry(0); do { - if (entry >= start && entry < end) // TODO can quit this loop early when entry >= end + if (entry >= end) + break; + else if (entry >= start) elist->Enter(entry); } while ((entry = fEntryList.Next()) >= 0);