Use std::array for blacklist

More annoying to add entries but maybe more streamlined
pull/197/head
jackun 4 years ago
parent 5261088243
commit a8f01a75e6
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -1,4 +1,4 @@
#include <vector>
#include <array>
#include <string>
#include <algorithm>
@ -23,7 +23,7 @@ static std::string get_proc_name() {
}
static bool check_blacklisted() {
std::vector<std::string> blacklist {
static const std::array<const char *, 15> blacklist {
"Battle.net.exe",
"BethesdaNetLauncher.exe",
"EpicGamesLauncher.exe",
@ -48,7 +48,7 @@ static bool check_blacklisted() {
return blacklisted;
}
bool& is_blacklisted() {
bool is_blacklisted() {
static bool blacklisted = check_blacklisted();
return blacklisted;
}

@ -1,3 +1,3 @@
#pragma once
bool& is_blacklisted();
bool is_blacklisted();

Loading…
Cancel
Save