Skip to content

Commit f43f3c2

Browse files
committed
Casting added for the constant value comparison
1 parent c440c7a commit f43f3c2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Launcher.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class Launcher : public PluginHost::IPlugin {
396396
uint8_t Seconds() const { return _second; }
397397

398398
private:
399-
bool Parse(const string& time) {
399+
void Parse(const string& time) {
400400
bool status = true;
401401
string t = time;
402402

@@ -424,8 +424,7 @@ class Launcher : public PluginHost::IPlugin {
424424
if (status == true) {
425425

426426
//Check all the time components are still valid
427-
if ((hour != (~0) && second != (~0)) && (minute == (~0))) {
428-
status = false;
427+
if ((hour != static_cast<uint8_t>(~0) && second != static_cast<uint8_t>(~0)) && (minute == static_cast<uint8_t>(~0))) {
429428
TRACE(Trace::Information, (_T("Invalid time format")));
430429
}
431430
else { //Update time components
@@ -436,7 +435,6 @@ class Launcher : public PluginHost::IPlugin {
436435
}
437436
}
438437
}
439-
return status;
440438
}
441439

442440
private:

0 commit comments

Comments
 (0)