[banshee] Lastfm: refactor else-if statement into two if blocks by returning early
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Lastfm: refactor else-if statement into two if blocks by returning early
- Date: Sat, 16 Mar 2013 23:07:19 +0000 (UTC)
commit 95ab8b8a70af86d2c3ddce2de1ea9ed067b97a36
Author: Andres G. Aragoneses <knocte gmail com>
Date: Sat Mar 16 20:42:41 2013 +0000
Lastfm: refactor else-if statement into two if blocks by returning early
The result is a bit more readable. No change of behaviour in this commit.
.../Lastfm/Lastfm/AudioscrobblerConnection.cs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
b/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
index dbc91cb..3a10e04 100644
--- a/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
+++ b/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
@@ -284,7 +284,10 @@ namespace Lastfm
next_interval = DateTime.Now + new TimeSpan (0, 0, RETRY_SECONDS);
hard_failures++;
state = State.Idle;
- } else if (error != StationError.None) {
+ return;
+ }
+
+ if (error != StationError.None) {
// TODO: If error == StationError.InvalidSessionKey,
// suggest to the user to (re)do the Last.fm authentication.
hard_failures++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]