[Kde-pim] Review Request 110220: Change the One-Line-If-Statement(s)

Martin Klapetek martin.klapetek at gmail.com
Sun Apr 28 10:21:12 BST 2013



> On April 27, 2013, 11:49 p.m., Sergio Luis Martins wrote:
> > Actually we don't need the braces for single line ifs, so it should be:
> > 
> > if (foo)
> >     bar;
> > 
> > Like in Qt/kdelibs, right ?

Regarding kdelibs coding style, the rule is to *always* put braces there[1]. Also from experience I find code with braces much better readable (but well, that's just me :)

[1] - http://techbase.kde.org/Policies/Kdelibs_Coding_Style#Braces


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110220/#review31690
-----------------------------------------------------------


On April 27, 2013, 4:42 p.m., Guy Maurel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110220/
> -----------------------------------------------------------
> 
> (Updated April 27, 2013, 4:42 p.m.)
> 
> 
> Review request for KDEPIM-Libraries and Volker Krause.
> 
> 
> Description
> -------
> 
> According the discussion in Berlin KDEPIM-Meeting and http://techbase.kde.org/Policies/Kdepim_Coding_Style#Migration
> I change the One-Line-If such as:
> if ( a > b ) c = 123;
> to a block:
> if ( a > b ) {
>    c = 123;
> }
> 
> 
> Diffs
> -----
> 
>   akonadi/item.h 9aa4012 
>   akonadi/socialutils/socialfeeditem.cpp 722536c 
> 
> Diff: http://git.reviewboard.kde.org/r/110220/diff/
> 
> 
> Testing
> -------
> 
> Tested for CMAKE_BUILD_TYPE "release" and "debug" with http://techbase.kde.org/Policies/Kdepim_Coding_Style#Check_the_assembler_files
> 
> 
> Thanks,
> 
> Guy Maurel
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list