Skip to content

Commit

Permalink
Use v.empty() instead of !v.size()
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelS239 committed Jan 10, 2025
1 parent 1256ce8 commit 837b657
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/algorithms/dd/split/split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ inline std::list<DD> Split::MergeReducedResults(std::list<DD> const& base_dds,

std::list<DD> Split::NegativePruningReduce(DF const& rhs, std::vector<DF> const& search,
unsigned& cnt) {
if (!search.size()) return {};
if (search.empty()) return {};

DF const last_df = search.back();

Expand All @@ -618,7 +618,7 @@ std::list<DD> Split::NegativePruningReduce(DF const& rhs, std::vector<DF> const&
auto const [prune, remainder] = NegativeSplit(search, last_df);

std::list<DD> dds = NegativePruningReduce(rhs, prune, cnt);
if (!dds.size() && IsFeasible(last_df)) dds.emplace_back(last_df, rhs);
if (dds.empty() && IsFeasible(last_df)) dds.emplace_back(last_df, rhs);
std::list<DD> const remaining_dds = NegativePruningReduce(rhs, remainder, cnt);

std::list<DD> merged_dds = MergeReducedResults(dds, remaining_dds);
Expand All @@ -629,7 +629,7 @@ std::list<DD> Split::NegativePruningReduce(DF const& rhs, std::vector<DF> const&

std::list<DD> Split::HybridPruningReduce(DF const& rhs, std::vector<DF> const& search,
unsigned& cnt) {
if (!search.size()) return {};
if (search.empty()) return {};

std::list<DD> dds;
DF const first_df = search.front();
Expand Down Expand Up @@ -664,7 +664,7 @@ std::list<DD> Split::HybridPruningReduce(DF const& rhs, std::vector<DF> const& s
std::list<DD> Split::InstanceExclusionReduce(std::vector<std::size_t> const& tuple_pair_indices,
std::vector<DF> const& search, DF const& rhs,
unsigned& cnt) {
if (!search.size()) return {};
if (search.empty()) return {};

std::list<DD> dds;
DF const first_df = search.front();
Expand Down

0 comments on commit 837b657

Please sign in to comment.