[Uml-devel] kdesdk/umbrello/umbrello
Luis De la Parra Blum
lparrab at gmx.net
Fri Mar 21 08:48:07 UTC 2003
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.
More information about the umbrello-devel
mailing list