forked from lix-project/hydra
Remove superfluous "has" function
This commit is contained in:
parent
a5879cbeb8
commit
c087472c71
|
@ -249,7 +249,7 @@ void getDependents(Step::ptr step, std::set<Build::ptr> & builds, std::set<Step:
|
|||
std::function<void(Step::ptr)> visit;
|
||||
|
||||
visit = [&](Step::ptr step) {
|
||||
if (has(steps, step)) return;
|
||||
if (steps.count(step)) return;
|
||||
steps.insert(step);
|
||||
|
||||
std::vector<Step::wptr> rdeps;
|
||||
|
|
|
@ -89,7 +89,7 @@ bool State::getQueuedBuilds(Connection & conn, std::shared_ptr<StoreAPI> store,
|
|||
BuildID id = row["id"].as<BuildID>();
|
||||
if (buildOne && id != buildOne) continue;
|
||||
if (id > newLastBuildId) newLastBuildId = id;
|
||||
if (has(*builds_, id)) continue;
|
||||
if (builds_->count(id)) continue;
|
||||
|
||||
auto build = std::make_shared<Build>();
|
||||
build->id = id;
|
||||
|
|
|
@ -439,10 +439,3 @@ public:
|
|||
|
||||
void run(BuildID buildOne = 0);
|
||||
};
|
||||
|
||||
|
||||
template <class C, class V>
|
||||
bool has(const C & c, const V & v)
|
||||
{
|
||||
return c.find(v) != c.end();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue