Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: >>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > | Lars> I won't with -1 or +1 either :-), you need to check first span | Lars> either way. > | start is initialized to 0, which is the start of the first span. > | I changed -1 to +1 in the patch. > | | No idea. I left it as it was. I can assert on it if you want. > | Lars> Nah... > | OK. > | | Lars> string str(1, par_.getChar(pos); | | Why is it better? > | Lars> do the work on initialization... only that. >
| I used push_back. Is that OK with you? the you should just leave it as is (+=). a push back buys nothing. | | I am not sure I like it... Doesn't the compiler give warnings | | on that? > | Lars> Why? > | Actually, I do not like it because both branches of the if() will be | compiled and in many cases it will not work (unavailable function). | Moreover, it is not clear by reading the code that one part is _never_ | executed. But the compiler will know and do the right thing. > | Lars> I can live with > | Lars> #if USE_LYX_FONTCACHE > | Lars> as well. > | I used #if defined(USE_LYX_FONTCACHE). Is that OK? I prefer to make it | clear that USE_LYX_FONTCACHE is a boolean value and not an int. And that is done with #if USE_LYX_FNTCACHE with defined(...) you only say this this is some macro... And you cannot seet USE_LYX_FONTCACHE to 0 then, because that would trigger... -- Lgb