Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWayland Server
Commits
89c8bb2a
Commit
89c8bb2a
authored
Oct 27, 2020
by
Aleix Pol Gonzalez
🐧
Browse files
Remove double lookups
parent
56ba6610
Changes
1
Show whitespace changes
Inline
Side-by-side
src/server/outputconfiguration_interface.cpp
View file @
89c8bb2a
...
...
@@ -294,18 +294,20 @@ void OutputConfigurationInterface::Private::sendFailed()
OutputChangeSet
*
OutputConfigurationInterface
::
Private
::
pendingChanges
(
OutputDeviceInterface
*
outputdevice
)
{
if
(
!
changes
.
keys
().
contains
(
outputdevice
))
{
changes
[
outputdevice
]
=
new
OutputChangeSet
(
outputdevice
,
q
);
auto
&
change
=
changes
[
outputdevice
];
if
(
!
change
)
{
change
=
new
OutputChangeSet
(
outputdevice
,
q
);
}
return
change
s
[
outputdevice
]
;
return
change
;
}
bool
OutputConfigurationInterface
::
Private
::
hasPendingChanges
(
OutputDeviceInterface
*
outputdevice
)
const
{
if
(
!
changes
.
keys
().
contains
(
outputdevice
))
{
auto
it
=
changes
.
constFind
(
outputdevice
);
if
(
it
==
changes
.
constEnd
())
{
return
false
;
}
auto
c
=
changes
[
outputdevice
]
;
auto
c
=
*
it
;
return
c
->
enabledChanged
()
||
c
->
modeChanged
()
||
c
->
transformChanged
()
||
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment