Am Sonntag, 4. Juni 2006 14:06 schrieb Peter Kümmel:
> And here a patch which removes a lot of
> warning about performance and some
> signed/unsigned mismatches.

I see the signed/unsigned things, but which changes should have something 
to do with performance? Which compiler is that?

>   Index: DepTable.C
> ===================================================================
> --- DepTable.C  (Revision 13994)
> +++ DepTable.C  (Arbeitskopie)
> @@ -253,5 +253,5 @@
>                 }
>                 deplist[nome] = di;
>         }
> -       return deplist.size();
> +       return deplist.size() != 0;

We use
+       return !deplist.empty();
all over the place.


> Index: lyxtextclass.C
> ===================================================================
> --- lyxtextclass.C      (Revision 13994)
> +++ lyxtextclass.C      (Arbeitskopie)
> @@ -1062,7 +1062,7 @@
>  
>  bool LyXTextClass::provides(LyXTextClass::Provides p) const
>  {
> -       return provides_ & p;
> +       return (provides_ & p) != 0;
>  }

I have the feeling that you will get objections for things like this from 
others.

> Index: encoding.C
> ===================================================================
> --- encoding.C  (Revision 13994)
> +++ encoding.C  (Arbeitskopie)
> @@ -341,7 +341,7 @@
>                         for (unsigned int i = 0; i < 256; ++i) {
>                                 lex.next();
>                                 string const tmp = lex.getString();
> -                               table[i] = ::strtol(tmp.c_str(), 0 , 
16);
> +                               table[i] = 
static_cast<Uchar>(::strtol(tmp.c_str(), 0 , 16));

Why is this cast necessary? I don't get a warning here.


Georg

Reply via email to