Reduce Applet::containment calls

It's not a cheap call, and there's no need to re-calculate it every time.
This commit is contained in:
Aleix Pol 2014-06-17 16:02:43 +02:00
parent e1051994ad
commit 97cf403288

View File

@ -453,8 +453,8 @@ Plasma::Types::ItemStatus AppletInterface::status() const
int AppletInterface::screen() const
{
if (applet()->containment()) {
return applet()->containment()->screen();
if (Plasma::Containment* c = applet()->containment()) {
return c->screen();
}
return -1;