Angus Leeming <[EMAIL PROTECTED]> writes:

| Peter Kümmel <[EMAIL PROTECTED]> writes:
| > > Yes, it's MSVC. It's a performance warning about possibly loosing
| > > precision due to the automatic cast. You can get rid of the warning via
| > > an explicit cast.
| > > 
| > > +       return bool(provides_ & p);
| > 
| > Yes, that's a better solution.
| 
| It's certainly clear what's going on.
| 
| Obviously, I'm in a pedantic mood. These two are casts:
|    (bool)1;
|    static_cast<bool>(1);
| This one isn't:
|    bool(1);

I think I still prefere this last one.

| Ain't C++ funky? ;-)
| 
| > (the warning was:
| > ..\..\lyx-devel\src\lyxtextclass.C(1065) : warning C4800: 'int' :
| > forcing value to bool 'true' or 'false' (performance warning)
| > )

Why is it a performance warning?


-- 
        Lgb

Reply via email to