Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
| 
| Lars> This patch speeds up the scroll-down test by and odd second or
| Lars> two for me. Do others see the same? I guess it cannot do any
| Lars> harm, so committing.
| 
| Isn't it possible to do this in a more compact way? If we use macros,
| we can do
| 
| #define LYXERR(flag) if (lyxerr.debugging(flag)) lyxerr
| 
| and then (if I am not mistaken)
| 
| LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION [etc etc]
| 
| does the same as what you have done. Now, I know that macros are evil,
| but it seems to me that this would be helpful.

If we go the macro way (and we should be very careful about this),
then we should go even a bit further.

We should then use a macro that adds the BOOST_CURRENT_FUNCTION, and
__FILE__ and __LINE__ always to the debug output.

But that would be in a completely other set of patches.
 
| We can even do
| 
| #define LYXERR(flag) if (false) lyxerr
| 
| and get rid of all debug output at compile time.

Perhaps, but note that we do this in exaclye zero places as of today.
(we always keep debug output compiled in. Which is nice imho.)

-- 
        Lgb

Reply via email to