pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pingus-CVS] CVS: Games/Pingus/src/gui gui_manager.cxx,1.9,1.10


From: Kenneth Gangstoe
Subject: Re: [Pingus-CVS] CVS: Games/Pingus/src/gui gui_manager.cxx,1.9,1.10
Date: Thu, 15 Aug 2002 16:25:23 +0200
User-agent: Mutt/1.3.28i

Why not use
void foobar(float x, int /*y*/) {...}

- Kenneth

> address@hidden writes:
> 
> >  GUIManager::add (Component* c, bool delete_component) 
> >  { 
> >    components.push_back(c); 
> > +  if(delete_component);
> >  }
> 
> I find these empty 'if's rather ugly. We should probally replace them
> with something like:
> 
> #define UNUSED_ARGUMENT (x) (void)(x)
> 
> #define UNUSED_ARGUMENT (x) if(x);else;
> 
> #ifdef GCC
> #define UNUSED_ARGUMENT (x) __attribute__ ((unused)) x
> #endif
> 
> or what ever the compiler likes most.
> 
> The last one could be used like:
> 
> void foobar (float x, int UNUSED_ARGUMENT (y))... 
> 
> while the other ones would be placed in the function body:
> 
> void foobar (float x, int y) {
>         UNUSED_ARGUMENT (y);
>         ...
> }
> 
> Not sure if windows provides something simalar to the __attribute__
> thing of GCC.
> 
> -- 
> WWW:      http://pingus.seul.org/~grumbel/ 
> Games:    http://pingus.seul.org/~grumbel/gamedesigns/
> JabberID: address@hidden 
> ICQ:      59461927
> 
> 
> _______________________________________________
> Pingus-Devel mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/pingus-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]