[Scummvm-devel] Nested scopes in scummvm code.
Filippos Karapetis
philipk79 at hotmail.com
Wed Sep 16 09:30:24 CEST 2009
There's also one more issue that is a bit unclear:
In switch statements, if braces are needed, should these be placed to the right of the case line?
i.e.
switch(foo) {
case 1: {
doSomething();
}
break;
case 2:
{
doSomethingElse();
}
break;
}
Should the braces look like case 1 or case 2?
I think that case 1 is more appropriate, but that is a bit unclear from the current wiki page
Regards
Filippos
> From: sev at scummvm.org
> Date: Wed, 16 Sep 2009 10:06:00 +0300
> To: whoozle at yandex.ru
> CC: scummvm-devel at lists.sourceforge.net; lordhoto at scummvm.org
> Subject: Re: [Scummvm-devel] Nested scopes in scummvm code.
>
> 2009/9/16 Vladimir Menshakov <whoozle at yandex.ru>:
> > 16.09.09, 02:41, "Johannes Schickel" <lordhoto at scummvm.org>:
> >
> >> megath at users.sourceforge.net wrote:
> >> > @@ -356,9 +356,13 @@
> >> > }
> >> > }
> >> >
> >> > - if (!hide_actor) {
> >> > + {
> >> > Surface *mark = actor_animation.currentFrame();
> >> >
> >> That's also violating our code formatting guidelines ;-). Maybe you
> >> should read all of them again.
> >> // Johannes
> >
> > Imagine that there's hidden "if (true) {" . Is there guidelines for nested scopes in scummvm code convention? Minor issue that has to be cleared.
> That is correct indentation. It would be nice if somebody update our
> conventions. In fact, it is widely used in switch() statements all
> around the code. That is (ignore the tabs):
>
> someCode();
>
> a += 1;
>
> {
> int foo;
>
> foo = 5;
> }
>
> someMoreCode();
>
>
> Eugene
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090916/7612d6df/attachment.html>
More information about the Scummvm-devel
mailing list