summaryrefslogtreecommitdiff
path: root/indra/llui/lltimectrl.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-03-16 09:49:57 -0700
committerMerov Linden <merov@lindenlab.com>2015-03-16 09:49:57 -0700
commit9ba10bf1f2ee16eb082f4cb29b0b9f7172e7ce8e (patch)
tree9548ff32e0a1dc5b3f8a70b2a386827f72bf5284 /indra/llui/lltimectrl.cpp
parent184bf6a76fd3b52efa83c93f56164d2adce7ed3e (diff)
parentd4a2e9fd9a0e7001a6c824ddd6cf37039a632b9d (diff)
Merge lindenlab/viewer-tools-update
Diffstat (limited to 'indra/llui/lltimectrl.cpp')
-rwxr-xr-xindra/llui/lltimectrl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llui/lltimectrl.cpp b/indra/llui/lltimectrl.cpp
index 9ea1e8815e..516057f8fd 100755
--- a/indra/llui/lltimectrl.cpp
+++ b/indra/llui/lltimectrl.cpp
@@ -153,7 +153,7 @@ U32 LLTimeCtrl::getMinutes() const
void LLTimeCtrl::setTime24(F32 time)
{
time = llclamp(time, 0.0f, 23.99f); // fix out of range values
- mTime = llround(time * MINUTES_PER_HOUR); // fixes values like 4.99999
+ mTime = ll_round(time * MINUTES_PER_HOUR); // fixes values like 4.99999
updateText();
}
@@ -381,7 +381,7 @@ bool LLTimeCtrl::isHoursStringValid(const std::string& str)
bool LLTimeCtrl::isMinutesStringValid(const std::string& str)
{
U32 minutes;
- if (!LLStringUtil::convertToU32(str, minutes) || (minutes <= MINUTES_MAX) && str.length() < 3)
+ if (!LLStringUtil::convertToU32(str, minutes) || ((minutes <= MINUTES_MAX) && str.length() < 3))
return true;
return false;
@@ -415,7 +415,8 @@ U32 LLTimeCtrl::parseHours(const std::string& str)
U32 LLTimeCtrl::parseMinutes(const std::string& str)
{
U32 minutes;
- if (LLStringUtil::convertToU32(str, minutes) && (minutes >= MINUTES_MIN) && (minutes <= MINUTES_MAX))
+ // not sure of this fix - clang doesnt like compare minutes U32 to >= MINUTES_MIN (0) but MINUTES_MIN can change
+ if (LLStringUtil::convertToU32(str, minutes) && ((S32)minutes >= MINUTES_MIN) && ((S32)minutes <= MINUTES_MAX))
{
return minutes;
}