Skip to content

Commit eefd88b

Browse files
committed
Remove unecessary conditionals
Signed-off-by: Thomas Wilshaw <thomaswilshaw@gmail.com>
1 parent ba164c2 commit eefd88b

File tree

1 file changed

+6
-30
lines changed

1 file changed

+6
-30
lines changed

tools.cpp

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -80,49 +80,25 @@ bool run_otiotool_command(std::string options, bool debug = false)
8080
}
8181

8282
bool Redact() {
83-
if (run_otiotool_command("--redact")) {
84-
return true;
85-
} else {
86-
return false;
87-
}
83+
return run_otiotool_command("--redact");
8884
}
8985

9086
bool VideoOnly() {
91-
if (run_otiotool_command("--video-only")) {
92-
return true;
93-
} else {
94-
return false;
95-
}
87+
return run_otiotool_command("--video-only");
9688
}
9789

9890
bool AudioOnly() {
99-
if (run_otiotool_command("--audio-only")) {
100-
return true;
101-
} else {
102-
return false;
103-
}
91+
return run_otiotool_command("--audio-only");
10492
}
10593

10694
bool FlattenAllTracks() {
107-
if (run_otiotool_command("--flatten all")) {
108-
return true;
109-
} else {
110-
return false;
111-
}
95+
return run_otiotool_command("--flatten all");
11296
}
11397

11498
bool FlattenVideoTracks() {
115-
if (run_otiotool_command("--flatten video")) {
116-
return true;
117-
} else {
118-
return false;
119-
}
99+
return run_otiotool_command("--flatten video");
120100
}
121101

122102
bool FlattenAudioTracks() {
123-
if (run_otiotool_command("--flatten audio")) {
124-
return true;
125-
} else {
126-
return false;
127-
}
103+
return run_otiotool_command("--flatten audio");
128104
}

0 commit comments

Comments
 (0)