Browse Source

Replace array with unordered set for better performance.

master
Andrius Štikonas 3 months ago
parent
commit
5da47c26e9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/util/externalcommand_whitelist.h

+ 3
- 1
src/util/externalcommand_whitelist.h View File

@ -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…
Cancel
Save