Skip to content

Commit

Permalink
fix(video2x): remove redundant newline statements
Browse files Browse the repository at this point in the history
Signed-off-by: k4yt3x <i@k4yt3x.com>
  • Loading branch information
k4yt3x committed Dec 21, 2024
1 parent 5c4d23b commit 2afbeab
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tools/video2x/src/video2x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,7 @@ int main(int argc, char **argv) {
}
} else if (ch == 'q' || ch == 'Q') {
// Abort processing
if (logger_sink->get_needs_newline()) {
putchar('\n');
}
video2x::logger()->warn("Aborting gracefully; press Ctrl+C to terminate forcefully.");
logger_sink->set_needs_newline(false);
video_processor.abort();
break;
}
Expand Down Expand Up @@ -210,12 +206,6 @@ int main(int argc, char **argv) {
// Join the processing thread to ensure it completes before exiting
processing_thread.join();

// Print a newline if progress bar was displayed
if (logger_sink->get_needs_newline()) {
logger_sink->set_needs_newline(false);
std::cout << '\n';
}

// Print final message based on processing result
if (video_processor.get_state() == video2x::VideoProcessorState::Aborted) {
video2x::logger()->warn("Video processing aborted");
Expand Down

0 comments on commit 2afbeab

Please sign in to comment.