mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
* src/frontends/qt4/GuiFontMetrics.C
(GuiFontMetrics::signedWidth): Micropotimization: Avoid a temporary docstring git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15755 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ac2057254f
commit
99d066de95
@ -145,7 +145,7 @@ int GuiFontMetrics::width(QString const & ucs2) const
|
|||||||
int GuiFontMetrics::signedWidth(docstring const & s) const
|
int GuiFontMetrics::signedWidth(docstring const & s) const
|
||||||
{
|
{
|
||||||
if (s[0] == '-')
|
if (s[0] == '-')
|
||||||
return -FontMetrics::width(s.substr(1, s.length() - 1));
|
return -width(&(s[1]), s.length() - 1);
|
||||||
else
|
else
|
||||||
return FontMetrics::width(s);
|
return FontMetrics::width(s);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user