On Sun, Jun 04, 2006 at 02:06:50PM +0200, Peter Kümmel wrote:
> Index: DepTable.C
> ===================================================================
> --- DepTable.C        (Revision 13994)
> +++ DepTable.C        (Arbeitskopie)
> @@ -253,5 +253,5 @@
>               }
>               deplist[nome] = di;
>       }
> -     return deplist.size();
> +     return deplist.size() != 0;

Not sure what deplist is, but 

   return !deplist.empty()

might work as well.

> Index: mathed/math_extern.C
> ===================================================================
> --- mathed/math_extern.C      (Revision 13994)
> +++ mathed/math_extern.C      (Arbeitskopie)
> @@ -202,7 +202,7 @@
>  {
>       istringstream is(charSequence(ar.begin(), ar.end()));
>       is >> i;
> -     return is;
> +     return is != 0;

What's that?

> Index: mathed/math_factory.C
> ===================================================================
> --- mathed/math_factory.C     (Revision 13994)
> +++ mathed/math_factory.C     (Arbeitskopie)
> @@ -379,5 +379,5 @@
>       if (ar.size() != 1)
>               return false;
>  
> -     return ar[0].nucleus();
> +     return ar[0].nucleus() != 0;

Using a pointer as 'bool' is perfectly valid.

> Index: mathed/math_mathmlstream.h
> ===================================================================
> --- mathed/math_mathmlstream.h        (Revision 13994)
> +++ mathed/math_mathmlstream.h        (Arbeitskopie)
> @@ -42,7 +42,7 @@
>       ///
>       bool fragile() const { return fragile_; }
>       ///
> -     bool latex() const { return latex_; }
> +     bool latex() const { return latex_ != 0; }

Maybe latex_ could be a bool?

>       virtual bool buttonStatus(Button button) const {
> -             return button & outputs_[state_];
> +             return (button & outputs_[state_])!= 0;

Spacing is off.

In general I am not sure these extra  (...) != 0  improve readability.

Andre'

Reply via email to