From 1660ff191a15f4062819209f28493eacb9153083 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 27 Apr 2012 17:34:56 +0200 Subject: Refactoring: simplify conditional expressions --- main/src/cgeo/geocaching/cgData.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'main/src') diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java index c290917..468dbfa 100644 --- a/main/src/cgeo/geocaching/cgData.java +++ b/main/src/cgeo/geocaching/cgData.java @@ -1227,11 +1227,7 @@ public class cgData { ok = true; } else { final int rows = databaseRW.update(dbTableWaypoints, values, "_id = " + id, null); - if (rows > 0) { - ok = true; - } else { - ok = false; - } + ok = rows > 0; } databaseRW.setTransactionSuccessful(); } finally { @@ -1945,7 +1941,7 @@ public class cgData { cursor.getString(indexLog)); log.id = cursor.getInt(indexLogsId); log.found = cursor.getInt(indexFound); - log.friend = cursor.getInt(indexFriend) == 1 ? true : false; + log.friend = cursor.getInt(indexFriend) == 1; logs.add(log); } if (!cursor.isNull(indexLogImagesId)) { -- cgit v1.1