aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-11 17:34:37 +0100
committerMax Kellermann <max@duempel.org>2015-11-11 17:41:02 +0100
commitafc1236b066480656cd7285364a9d79dae01f763 (patch)
treea95b01b9b7b3e2aa8ebb659c1712b0b0680623c3
parentbedd5f00f86830b07d8a0649a66112840e6edf35 (diff)
downloadmpd-afc1236b066480656cd7285364a9d79dae01f763.tar.gz
mpd-afc1236b066480656cd7285364a9d79dae01f763.tar.xz
mpd-afc1236b066480656cd7285364a9d79dae01f763.zip
player/Control: move code to ClearError()
-rw-r--r--src/player/Control.cxx7
-rw-r--r--src/player/Control.hxx5
2 files changed, 6 insertions, 6 deletions
diff --git a/src/player/Control.cxx b/src/player/Control.cxx
index 830dd146d..290f61af8 100644
--- a/src/player/Control.cxx
+++ b/src/player/Control.cxx
@@ -185,12 +185,7 @@ void
PlayerControl::LockClearError()
{
Lock();
-
- if (error_type != PlayerError::NONE) {
- error_type = PlayerError::NONE;
- error.Clear();
- }
-
+ ClearError();
Unlock();
}
diff --git a/src/player/Control.hxx b/src/player/Control.hxx
index 812f4d621..edfde09fe 100644
--- a/src/player/Control.hxx
+++ b/src/player/Control.hxx
@@ -326,6 +326,11 @@ public:
private:
void PauseLocked();
+ void ClearError() {
+ error_type = PlayerError::NONE;
+ error.Clear();
+ }
+
public:
void LockPause();