From a813bcb76929cba6fbc17fddbcbc8a88d335cde4 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Wed, 18 Jan 2023 16:54:30 -0600 Subject: [PATCH] use slightly more succinct idiom --- plugins/autofarm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/autofarm.cpp b/plugins/autofarm.cpp index f7acde17f..566c49355 100644 --- a/plugins/autofarm.cpp +++ b/plugins/autofarm.cpp @@ -341,7 +341,7 @@ public: for (auto& th : thresholds) { - if (lastCounts.find(th.first) != lastCounts.end()) + if (lastCounts.count(th.first) > 0) continue; auto plant = world->raws.plants.all[th.first]; out << plant->id << " limit " << getThreshold(th.first) << " current 0" << '\n';