[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [Uml-devel] kdesdk/umbrello/umbrello
From:       Luis De la Parra Blum <lparrab () gmx ! net>
Date:       2003-03-21 16:47:32
[Download RAW message or body]

On Wednesday 19 March 2003 17:51, Frerich Raabe wrote:
> > #define round(x) (x < 0 ? int(x - 0.5)  : int(x + 0.5))
> >
> > It was only an idea to overcome the problem of rewriting the code if a
> > function is missing.
>
> This will break for invocations like "int i = round(++x);"

why do you insist in using a define? you can simply put thatcode in a 
function.
If you dont want the function to be global, just put it in an anonymous 
namespace in the cpp file.

luis.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic