Replace array with unordered set for better performance.
This commit is contained in:
parent
551654de0d
commit
5da47c26e9
|
@ -8,7 +8,9 @@
|
|||
#ifndef KPMCORE_EXTERNALCOMMAND_WHITELIST_H
|
||||
#define KPMCORE_EXTERNALCOMMAND_WHITELIST_H
|
||||
|
||||
QString allowedCommands[] = {
|
||||
#include <unordered_set>
|
||||
|
||||
const std::unordered_set<QString> allowedCommands {
|
||||
// TODO no root needed
|
||||
QStringLiteral("lsblk"),
|
||||
QStringLiteral("udevadm"),
|
||||
|
|
Loading…
Reference in New Issue