[haiku-development] Re: I want to involve

  • From: "Lukas Durfina" <lukas.durfina@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 06 Mar 2008 16:33:10 +0100

On Thu, 06 Mar 2008 14:00:10 +0100, Stephan Assmus <superstippi@xxxxxx> wrote:


Hi Lukas,

thank your for your work!

Lukas Durfina wrote:
> 2) I think your somewhat aggressive use of static_cast makes things a
> bit unreadable, as in:
> -                kDefaultShellCommand[1], NULL);
> +                kDefaultShellCommand[1], static_cast<char *>(NULL));

   ok, if I want to remove warning, because function expects char*,
so it is better to use (char *) or do anything and ignore warning?

> 3) if you need to break a line into two, the second line is only
> indented a single tab, so the following (as you did) is wrong:
> -    return CurPos(p.x / fFontWidth, p.y / fFontHeight);
> +    return CurPos(static_cast<int32>(p.x / fFontWidth),
> +                    static_cast<int32>(p.y / fFontHeight));
>
> (this is also a good example of not using static_cast IMO)


also, use (int32) or ingore it?

It is prefered to fix any warnings. Personally I don't know if there is any
compelling pro argument for the new style casts. I just find "(int32)" or
"(char*)" much better readable, so I always use those.

Best regards,
-Stephan


  so I tried to remove problems from patch
and follow suggestions.

  Patch contains only real changes,
if I have time, I will add patch with
cosmetic changes.


  Is that one OK?

  Lukas

Other related posts: