summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrhyskidd@gmail.com <rhyskidd@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-07-22 07:18:11 +0000
committerrhyskidd@gmail.com <rhyskidd@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-07-22 07:18:11 +0000
commit10a127c526327da779c88fead87cb00e56d953c4 (patch)
treedf3b8dba15629a08cb4407bb4d390982595260cb
parent75e409067ece85e6daff1429a6ff5be448bad449 (diff)
downloadstarshatter-10a127c526327da779c88fead87cb00e56d953c4.zip
starshatter-10a127c526327da779c88fead87cb00e56d953c4.tar.gz
starshatter-10a127c526327da779c88fead87cb00e56d953c4.tar.bz2
PVS-Studio fix: V592 The expression was enclosed by parentheses twice: '((t - h * HOUR - m * MINUTE))'. One pair of parentheses is unnecessary or misprint is present.
-rw-r--r--nGenEx/FormatUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/nGenEx/FormatUtil.cpp b/nGenEx/FormatUtil.cpp
index a2ad6f7..3e9fc55 100644
--- a/nGenEx/FormatUtil.cpp
+++ b/nGenEx/FormatUtil.cpp
@@ -64,7 +64,7 @@ void FormatTime(char* txt, double time)
int h = (t / HOUR);
int m = ((t - h*HOUR) / MINUTE);
- int s = ((t - h*HOUR - m*MINUTE));
+ int s = (t - h*HOUR - m*MINUTE);
if (h > 0)
sprintf(txt, "%02d:%02d:%02d", h,m,s);
@@ -85,7 +85,7 @@ void FormatTimeOfDay(char* txt, double time)
int h = (t / HOUR);
int m = ((t - h*HOUR) / MINUTE);
- int s = ((t - h*HOUR - m*MINUTE));
+ int s = (t - h*HOUR - m*MINUTE);
sprintf(txt, "%02d:%02d:%02d", h,m,s);
}