[vlmc-devel] [PATCH] Use simple if ()
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Sat Apr 2 11:26:00 CEST 2016
On 03/29/2016 03:50 PM, Yikai Lu wrote:
> ---
> src/Gui/MainWindow.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
> index 786effd..8bd8f3b 100644
> --- a/src/Gui/MainWindow.cpp
> +++ b/src/Gui/MainWindow.cpp
> @@ -341,10 +341,10 @@ MainWindow::initVlmcPreferences()
> void
> MainWindow::on_actionSave_triggered()
> {
> - if ( Core::getInstance()->project()->hasProjectFile() == false )
> - on_actionSave_As_triggered();
> - else
> + if ( Core::getInstance()->project()->hasProjectFile() )
> Core::getInstance()->project()->save();
> + else
> + on_actionSave_As_triggered();
> }
>
> void
>
I'm ok with putting the success condition first, however I tend to like
explicit comparison more (ie. if ( something == true ) rather that if (
something ) so I'm a bit reluctant about removing those
Regards,
More information about the Vlmc-devel
mailing list