From b288e8e5d98684ae81c109a4c4ffa1d25fc4d727 Mon Sep 17 00:00:00 2001 From: raphael0202 Date: Fri, 18 Mar 2016 08:04:08 +0100 Subject: [Bug #1558177] Simplify if conditions in Script.cpp. Fixed bugs: - https://launchpad.net/bugs/1558177 (bzr r14715) --- src/extension/implementation/script.cpp | 6 +----- src/extension/output.cpp | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index f990598eb..2ec17f947 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -232,11 +232,7 @@ bool Script::check_existence(const std::string &command) //Don't search when it is an absolute path. */ if (Glib::path_is_absolute(command)) { - if (Glib::file_test(command, Glib::FILE_TEST_EXISTS)) { - return true; - } else { - return false; - } + return Glib::file_test(command, Glib::FILE_TEST_EXISTS); } // First search in the current directory diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 8de5583c7..83f0fed2f 100644 --- a/src/extension/output.cpp +++ b/src/extension/output.cpp @@ -192,8 +192,7 @@ Output::prefs (void) delete dialog; - if (response == Gtk::RESPONSE_OK) return true; - return false; + return (response == Gtk::RESPONSE_OK); } /** -- cgit v1.2.3