Lars Gullik Bjønnes wrote: > Andre Poenitz > <[EMAIL PROTECTED]> > writes: > > | On Wed, Feb 21, 2007 at 10:19:57AM +0100, Lars Gullik Bjønnes wrote: > | > | if (runparams.linelen > 0 && > | > | currlinelen + word.length() > runparams.linelen) { > | > | os << '\n'; > | > > | > I wonder... it is wise to compare ucs4 chars directly to chars? > | > | This is safe. Integer promotion. > > and when char is signed?
As I wrote: This should only be done for chars in the ASCII range (we should not have any non-ASCII character in the source files anyway (apart from comments of course). If the char is in the ASCII range then it does not matter whether it is signed or not. > | > Or should be wrap it up? (same for direct comparion to META_INSET > | > really...) > | > > | > is_inset(c) || is_space(c) > | > | Not really needed. Especially is_space() suggests something more complex > | than s simple comparison to ' '. > > But perhaps it should be possible to have this more complex than a > simple comparison to ' '. In that case use a helper function. This might actually make sense in this case, but your original comment loooked to me as if you would like an is_space() that only checks for a simple space, and that should not be done IMO. Georg