Andre Poenitz <[EMAIL PROTECTED]> writes:

| The attached patch introduces "real" insets for font changes for mathed.
| This  
|  (a) is not yet fully functional again
|  (b) is still a bit awkward to navigate (an extra <Left> or <Right>)
|  (c) simplifies the code by removing some not-so-pretty hacks.
>
| Comments?

Why this:

+       MathPainterInfo pi = MathPainterInfo(bv->painter());

and not 
        MathPaitnerInfo pi(bv->painter());

?

Parenthesis perhaps?
+       pi.base.style = display() ? LM_ST_DISPLAY : LM_ST_TEXT;
 

btw. why are you using strings instead of the ints? (LM_TC_GREEK1 ->
"lyxgreek1") Not that it really matter.
(Except that magic constants, be it ints or strings, are bad.)

Hmmm...

diff -u -p -r1.8 math_binaryopinset.C
--- math_binaryopinset.C        23 May 2002 09:21:30 -0000      1.8
+++ math_binaryopinset.C        29 May 2002 18:21:04 -0000
@@ -5,7 +5,11 @@
 #endif
 
 #include "math_binaryopinset.h"
+<<<<<<< math_binaryopinset.C
+#include "MathPainterInfo.h"
+=======
 #include "frontends/Painter.h"
+>>>>>>> 1.8
 #include "support/LOstream.h"


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 = "+-<>=/*";
   return memchr(binaries, 7, c);

or perhaps even (I'd prefere this one)

   static string const binaries("+-<>=/*");
   return binaries.find_first_of(c) != string::npos;



The patch looks pretty much ok to me. 

-- 
        Lgb


Reply via email to