From f3b3f21d3ba0fd48bc265684817cb38a70adf84b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 25 Dec 2008 07:53:09 -0500 Subject: Bounds errors are verbose now and some unchecked conditions fixed as well --- sigmod/Time.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sigmod/Time.cpp') 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); } -- cgit