On Mon, Feb 26, 2007 at 04:14:31PM +0100, Abdelrazak Younes wrote:
> --- lyx-devel/trunk/src/frontends/qt4/QLPainter.C (original)
> +++ lyx-devel/trunk/src/frontends/qt4/QLPainter.C Mon Feb 26 16:13:08 2007
> @@ -170,16 +170,10 @@
>  }
> 
> 
> -int QLPainter::text(int x, int y, docstring const & s, LyXFont const & f)
> -{
> -      return text(x, y, reinterpret_cast<char_type const *>(s.data()), 
> s.length(), f);
> -}
> -
> -
>  int QLPainter::text(int x, int y, char_type c, LyXFont const & f)
>  {
> -     char_type s[2] = { c, char_type('\0') };
> -     return text(x, y, s, 1, f);
> +     docstring s(c, 1);
> +     return text(x, y, s, f);
>  }

This was in the fast path a while ago. Not sure it still is now.
A temporary string (including allocation/deallocation) is not
a good idea on the fast path...

Andre'

Reply via email to