On Wed, May 29, 2002 at 08:50:05PM +0200, Lars Gullik Bj�nnes wrote:
> Why this:
>
> + MathPainterInfo pi = MathPainterInfo(bv->painter());
>
> and not
> MathPaitnerInfo pi(bv->painter());
Bad habits. You are right of course.
> btw. why are you using strings instead of the ints? (LM_TC_GREEK1 ->
> "lyxgreek1") Not that it really matter.
I can omit the string->int->string conversion in a place or two as some of
these strings can bey used directly (lyxgreek1 is not a good example...).
Nicer debugging if one "sees" the thing. I am prepared to change this again
if it shows up as a performance bottleneck.
> Do we really like strchr and friends?
>
> + bool isBinaryOp(char c)
> + {
> + return strchr("+-<>=/*", c);
> + }
>
> or would we rather like to see
>
> static char const * binaries = "+-<>=/*";
>
> or perhaps even (I'd prefere this one)
>
> static string const binaries("+-<>=/*");
> return binaries.find_first_of(c) != string::npos;
Well, it does not buy much (apart from leaving C), does it?
--
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)