From afc1236b066480656cd7285364a9d79dae01f763 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 11 Nov 2015 17:34:37 +0100 Subject: player/Control: move code to ClearError() --- src/player/Control.cxx | 7 +------ src/player/Control.hxx | 5 +++++ 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(); -- cgit v1.2.3