Skip to content

Commit

Permalink
Make add_blacklist const&
Browse files Browse the repository at this point in the history
Might be optimized by compiler already but who knows.
  • Loading branch information
jackun committed Dec 26, 2020
1 parent 72f1ec0 commit 4862d83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blacklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool is_blacklisted(bool force_recheck) {
return blacklisted;
}

void add_blacklist(std::string new_item) {
void add_blacklist(const std::string& new_item) {
// check if item exits in blacklist before adding new item
if(std::find(blacklist.begin(), blacklist.end(), new_item) != blacklist.end()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/blacklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define MANGOHUD_BLACKLIST_H
#include<string>
bool is_blacklisted(bool force_recheck = false);
void add_blacklist(std::string);
void add_blacklist(const std::string& proc);


#endif //MANGOHUD_BLACKLIST_H

0 comments on commit 4862d83

Please sign in to comment.