diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-12-25 07:53:09 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-12-25 07:53:09 -0500 |
| commit | f3b3f21d3ba0fd48bc265684817cb38a70adf84b (patch) | |
| tree | ccffe66f71e3ee15166080cda2aca7d842f547a2 /sigmod/Time.cpp | |
| parent | e88f1843d61fd0d4c02fa85c3444c786f8c8fd8d (diff) | |
Bounds errors are verbose now and some unchecked conditions fixed as well
Diffstat (limited to 'sigmod/Time.cpp')
| -rw-r--r-- | sigmod/Time.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sigmod/Time.cpp b/sigmod/Time.cpp index 32939e92..b4172405 100644 --- a/sigmod/Time.cpp +++ b/sigmod/Time.cpp @@ -83,16 +83,16 @@ void Sigmod::Time::setName(const QString& name) void Sigmod::Time::setHour(const int hour) { - if (24 <= hour) - emit(error(bounds("hour"))); + if ((hour < 0) || (24 <= hour)) + emit(error(bounds("hour", 0, 23, hour))); else CHECK(hour); } void Sigmod::Time::setMinute(const int minute) { - if (60 <= minute) - emit(error(bounds("minute"))); + if ((minute < 0) || (60 <= minute)) + emit(error(bounds("minute", 0, 59, minute))); else CHECK(minute); } |
