diff options
author | Michele Calgaro <[email protected]> | 2021-12-28 20:45:45 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-12-28 20:45:45 +0900 |
commit | 82b07f1a3cc29b9785c292174343b464a774a722 (patch) | |
tree | 7a3501a01cf6e6d645929063ac601f4d3eb91edb /tests | |
parent | 416bed9bc124e24cc1351c7d8e5810ca7570a023 (diff) | |
download | polkit-tqt-82b07f1a3cc29b9785c292174343b464a774a722.tar.gz polkit-tqt-82b07f1a3cc29b9785c292174343b464a774a722.zip |
Code improvements based on c++11 standard (ranged for loops and nullptr).
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_auth_enum_actions.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_auth_enum_actions.cpp b/tests/test_auth_enum_actions.cpp index d7c992a97..8a9030ff7 100644 --- a/tests/test_auth_enum_actions.cpp +++ b/tests/test_auth_enum_actions.cpp @@ -27,12 +27,11 @@ int main(void) } // Check whether enumerateAction returns at least example actions int count = 0; - ActionDescription::List::const_iterator adIt; - for (adIt = list.begin(); adIt != list.end(); ++adIt) + for (const ActionDescription &actionDesc : list) { - if (((*adIt).actionId() == "org.tqt.policykit.examples.kick") || - ((*adIt).actionId() == "org.tqt.policykit.examples.cry") || - ((*adIt).actionId() == "org.tqt.policykit.examples.bleed")) + if ((actionDesc.actionId() == "org.tqt.policykit.examples.kick") || + (actionDesc.actionId() == "org.tqt.policykit.examples.cry") || + (actionDesc.actionId() == "org.tqt.policykit.examples.bleed")) { count++; } |