From 5da47c26e922b3ad43c7bf90703a6bc25fd49ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 29 Nov 2020 13:48:07 +0000 Subject: [PATCH] Replace array with unordered set for better performance. --- src/util/externalcommand_whitelist.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/externalcommand_whitelist.h b/src/util/externalcommand_whitelist.h index 4c52ced..a224dc8 100644 --- a/src/util/externalcommand_whitelist.h +++ b/src/util/externalcommand_whitelist.h @@ -8,7 +8,9 @@ #ifndef KPMCORE_EXTERNALCOMMAND_WHITELIST_H #define KPMCORE_EXTERNALCOMMAND_WHITELIST_H -QString allowedCommands[] = { +#include + +const std::unordered_set allowedCommands { // TODO no root needed QStringLiteral("lsblk"), QStringLiteral("udevadm"),