]> git.lyx.org Git - lyx.git/commitdiff
* MathMacroArgument.C (MathMacroArgument): do not use convert<> since
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 20 Nov 2006 14:07:30 +0000 (14:07 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 20 Nov 2006 14:07:30 +0000 (14:07 +0000)
it may be too slow.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15996 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathMacroArgument.C

index 3bb72bde94a0a4728257dd52ad71307822abc5ba..999079b6409cf8e847e5e7257f257c32f29e65d8 100644 (file)
@@ -15,7 +15,6 @@
 #include "InsetMathMacro.h"
 #include "MathStream.h"
 #include "MathSupport.h"
-#include "support/convert.h"
 #include "debug.h"
 
 
@@ -34,7 +33,13 @@ MathMacroArgument::MathMacroArgument(size_t n)
                lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
                        << n << endl;
        }
-       str_ = '#' + convert<docstring>(n);
+       // The profiler tells us not to use 
+       // str_ = '#' + convert<docstring>(n);
+       // so we do the conversion of n to ASCII manually.
+       // This works because 1 <= n <= 9.
+       str_.resize(2);
+       str_[0] = '#';
+       str_[1] = '0' + n;
 }