Skip to content

Commit 860472a

Browse files
committed
lv-tool: Resolve strcmp duplication around actors to always exclude from cycling
(based on 0.4.x commit 6ce0880)
1 parent e6f05a5 commit 860472a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

libvisual/tools/lv-tool/lv-tool.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <atomic>
3333
#include <stdexcept>
3434
#include <iostream>
35+
#include <unordered_set>
3536
#include <string>
3637
#include <cstdio>
3738
#include <cstdlib>
@@ -56,6 +57,11 @@
5657

5758
namespace {
5859

60+
const std::unordered_set<std::string> actors_to_skip {
61+
"gdkpixbuf",
62+
"gstreamer"
63+
};
64+
5965
std::string actor_name;
6066
std::string input_name = DEFAULT_INPUT;
6167
std::string morph_name = DEFAULT_MORPH;
@@ -390,8 +396,7 @@ namespace {
390396

391397
// Always skip actors that are of little interest to end users,
392398
// while allowing explicit "--actor (gdkpixbuf|gstreamer)".
393-
if (strcmp (new_name, "gdkpixbuf") == 0 \
394-
|| strcmp (new_name, "gstreamer") == 0) {
399+
if (actors_to_skip.contains (new_name)) {
395400
return cycle_actor_name (new_name, dir);
396401
}
397402

0 commit comments

Comments
 (0)