[Scummvm-devel] Nested scopes in scummvm code.

Eugene Sandulenko sev at scummvm.org
Wed Sep 16 09:06:00 CEST 2009


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




More information about the Scummvm-devel mailing list