mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
(getGCLinepars): only lookup in the linecache once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3169 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
19d9667015
commit
dd51f5a487
@ -3,6 +3,7 @@
|
||||
* ColorHandler.C (updateColor): change the hash to cover the whole
|
||||
LColor enum, ws cleanup
|
||||
(getGCLinepars): ditto
|
||||
(getGCLinepars): only lookup in the linecache once.
|
||||
|
||||
2001-12-07 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
|
@ -172,8 +172,9 @@ GC LyXColorHandler::getGCLinepars(PainterBase::line_style ls,
|
||||
|
||||
int index = lw + (ls << 1) + (c << 6);
|
||||
|
||||
if (lineGCcache.find(index) != lineGCcache.end())
|
||||
return lineGCcache[index];
|
||||
LineGCCache::iterator it = lineGCcache.find(index);
|
||||
if (it != lineGCcache.end())
|
||||
return it->second;
|
||||
|
||||
XGCValues val;
|
||||
XGetGCValues(display, getGCForeground(c), GCForeground, &val);
|
||||
|
Loading…
Reference in New Issue
Block a user