aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hartmetz <[email protected]>2017-04-07 20:36:36 +0200
committerAndreas Hartmetz <[email protected]>2017-04-07 20:38:19 +0200
commit90a33a4bc2896fa6919587f4f736e01ddd18447a (patch)
treed0a0d3384bdf8e2f1f9afa8d990df0fbea41e4dd
parent0fa4c27c66baf4ce1025dd6e2b034bad25deeea6 (diff)
Fix two more const / non-const iterator mismatches.
I did some research with the result that such comparisons are indeed not standardized to be legal before C++14. In C++14 they are. These microoptimizations can thus be re-enabled when C++14 becomes the required version.
-rw-r--r--scripting/scriptedeffect.cpp2
-rw-r--r--scripting/scripting.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripting/scriptedeffect.cpp b/scripting/scriptedeffect.cpp
index 1397226..94d6b76 100644
--- a/scripting/scriptedeffect.cpp
+++ b/scripting/scriptedeffect.cpp
@@ -669,7 +669,7 @@ bool ScriptedEffect::registerTouchScreenCallback(int edge, QScriptValue callback
bool ScriptedEffect::unregisterTouchScreenCallback(int edge)
{
auto it = m_touchScreenEdgeCallbacks.find(edge);
- if (it == m_touchScreenEdgeCallbacks.constEnd()) {
+ if (it == m_touchScreenEdgeCallbacks.end()) {
return false;
}
delete it.value();
diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp
index b8e478b..22cefe0 100644
--- a/scripting/scripting.cpp
+++ b/scripting/scripting.cpp
@@ -552,7 +552,7 @@ bool KWin::Script::registerTouchScreenCallback(int edge, QScriptValue callback)
bool KWin::Script::unregisterTouchScreenCallback(int edge)
{
auto it = m_touchScreenEdgeCallbacks.find(edge);
- if (it == m_touchScreenEdgeCallbacks.constEnd()) {
+ if (it == m_touchScreenEdgeCallbacks.end()) {
return false;
}
delete it.value();