Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Use another compound assignment operator #946

Open
elfring opened this issue Dec 11, 2021 · 0 comments
Open

Use another compound assignment operator #946

elfring opened this issue Dec 11, 2021 · 0 comments

Comments

@elfring
Copy link

elfring commented Dec 11, 2021

👀 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/app/src/main/java/com/kabouzeid/gramophone/util/MusicUtil.java b/app/src/main/java/com/kabouzeid/gramophone/util/MusicUtil.java
index f7bd539d..ad8478d0 100644
--- a/app/src/main/java/com/kabouzeid/gramophone/util/MusicUtil.java
+++ b/app/src/main/java/com/kabouzeid/gramophone/util/MusicUtil.java
@@ -149,7 +149,7 @@ public class MusicUtil {
             return String.format(Locale.getDefault(), "%01d:%02d", minutes, seconds);
         } else {
             long hours = minutes / 60;
-            minutes = minutes % 60;
+            minutes %= 60;
             return String.format(Locale.getDefault(), "%d:%02d:%02d", hours, minutes, seconds);
         }
     }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant