From 6496ab55f3d34dd14a8d2aeb769eaf518e5bf136 Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 18 Mar 2025 00:07:41 -0500 Subject: [PATCH] use find instead of traversing unordered map --- src/App.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/App.cpp b/src/App.cpp index c73462f..15fb8f5 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -60,11 +60,10 @@ bool App::load(std::string lib, std::list blacklist = {}) { bool skip = false; - for(auto it = m->deps.begin(); it != m->deps.end(); it++) { - for(std::string s : blacklist) { - if(it->first == s) - skip = true; - } + for(std::string s : blacklist) { + auto it = m->deps.find(s); + if(it != m->deps.end()) + skip = true; if(skip) { skip = false; continue;