Use another compound assignment operator
Closed this issue ยท 2 comments
elfring commented
๐ Some source code analysis tools can help to find opportunities for improving software components.
๐ญ I propose to increase the usage of compound operators accordingly.
diff --git a/gpslogger/src/main/java/com/mendhak/gpslogger/common/Locations.java b/gpslogger/src/main/java/com/mendhak/gpslogger/common/Locations.java
index f3e7b6ac..022d4f35 100644
--- a/gpslogger/src/main/java/com/mendhak/gpslogger/common/Locations.java
+++ b/gpslogger/src/main/java/com/mendhak/gpslogger/common/Locations.java
@@ -50,7 +50,7 @@ public class Locations {
long recordedTime = loc.getTime();
//If the date is before April 6, 23:59:59, there's a GPS week rollover problem
if(recordedTime < 1554595199000L){
- recordedTime = recordedTime + 619315200000L; //add 1024 weeks
+ recordedTime += 619315200000L; //add 1024 weeks
loc.setTime(recordedTime);
}
mendhak commented
Hey thanks, you can submit a PR if you'd like since it's such a simple change. (Or I can do it myself if you prefer)
elfring commented
๐ญ It would be nice if you can integrate the adjustment for a single assignment statement directly.