summaryrefslogtreecommitdiff
path: root/indra/llui/lltextvalidate.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-10 20:03:54 +0300
committerGitHub <noreply@github.com>2024-06-10 20:03:54 +0300
commitf74c10c4ec6435471bac84473fe865f90843c2df (patch)
treeb2853d87789dbb84d6c26c259eab6639d3a7e482 /indra/llui/lltextvalidate.cpp
parent5fccb539937a52d286274a002266e022e2102e5e (diff)
parent32fcefc058ae38eff0572326ef3efd1c7b343144 (diff)
Merge branch 'DRTVWR-600-maint-A' into signal/trim-trailing
Diffstat (limited to 'indra/llui/lltextvalidate.cpp')
-rw-r--r--indra/llui/lltextvalidate.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/llui/lltextvalidate.cpp b/indra/llui/lltextvalidate.cpp
index 7ea8a3347e..9a087d8230 100644
--- a/indra/llui/lltextvalidate.cpp
+++ b/indra/llui/lltextvalidate.cpp
@@ -73,7 +73,7 @@ class ValidatorFloat : public ValidatorImpl
std::basic_string<CHAR> trimmed = str;
LLStringUtilBase<CHAR>::trim(trimmed);
- S32 len = trimmed.length();
+ auto len = trimmed.length();
if (0 < len)
{
// May be a comma or period, depending on the locale
@@ -118,7 +118,7 @@ class ValidatorInt : public ValidatorImpl
std::basic_string<CHAR> trimmed = str;
LLStringUtilBase<CHAR>::trim(trimmed);
- S32 len = trimmed.length();
+ auto len = trimmed.length();
if (0 < len)
{
S32 i = 0;
@@ -157,7 +157,7 @@ class ValidatorPositiveS32 : public ValidatorImpl
std::basic_string<CHAR> trimmed = str;
LLStringUtilBase<CHAR>::trim(trimmed);
- S32 len = trimmed.length();
+ auto len = trimmed.length();
if (0 < len)
{
CHAR ch = trimmed.front();
@@ -167,7 +167,7 @@ class ValidatorPositiveS32 : public ValidatorImpl
return setError("Validator_ShouldNotBeMinusOrZero", LLSD().with("CH", llsd(ch)));
}
- for (S32 i = 0; i < len; ++i)
+ for (size_t i = 0; i < len; ++i)
{
ch = trimmed[i];
if (!LLStringOps::isDigit(ch))
@@ -177,7 +177,7 @@ class ValidatorPositiveS32 : public ValidatorImpl
}
}
- S32 val = strtol(trimmed);
+ auto val = strtol(trimmed);
if (val <= 0)
{
return setError("Validator_InvalidNumericString", LLSD().with("STR", llsd(trimmed)));
@@ -201,7 +201,7 @@ class ValidatorNonNegativeS32 : public ValidatorImpl
std::basic_string<CHAR> trimmed = str;
LLStringUtilBase<CHAR>::trim(trimmed);
- S32 len = trimmed.length();
+ auto len = trimmed.length();
if (0 < len)
{
CHAR ch = trimmed.front();
@@ -211,7 +211,7 @@ class ValidatorNonNegativeS32 : public ValidatorImpl
return setError("Validator_ShouldNotBeMinus", LLSD().with("CH", llsd(ch)));
}
- for (S32 i = 0; i < len; ++i)
+ for (size_t i = 0; i < len; ++i)
{
ch = trimmed[i];
if (!LLStringOps::isDigit(ch))
@@ -221,7 +221,7 @@ class ValidatorNonNegativeS32 : public ValidatorImpl
}
}
- S32 val = strtol(trimmed);
+ auto val = strtol(trimmed);
if (val < 0)
{
return setError("Validator_InvalidNumericString", LLSD().with("STR", llsd(trimmed)));
@@ -244,7 +244,7 @@ class ValidatorNonNegativeS32NoSpace : public ValidatorImpl
LLLocale locale(LLLocale::USER_LOCALE);
std::basic_string<CHAR> test_str = str;
- S32 len = test_str.length();
+ auto len = test_str.length();
if (0 < len)
{
CHAR ch = test_str.front();
@@ -254,7 +254,7 @@ class ValidatorNonNegativeS32NoSpace : public ValidatorImpl
return setError("Validator_ShouldNotBeMinus", LLSD().with("CH", llsd(ch)));
}
- for (S32 i = 0; i < len; ++i)
+ for (size_t i = 0; i < len; ++i)
{
ch = test_str[i];
if (!LLStringOps::isDigit(ch) || LLStringOps::isSpace(ch))
@@ -264,7 +264,7 @@ class ValidatorNonNegativeS32NoSpace : public ValidatorImpl
}
}
- S32 val = strtol(test_str);
+ auto val = strtol(test_str);
if (val < 0)
{
return setError("Validator_InvalidNumericString", LLSD().with("STR", llsd(test_str)));
@@ -286,7 +286,7 @@ class ValidatorAlphaNum : public ValidatorImpl
{
LLLocale locale(LLLocale::USER_LOCALE);
- S32 len = str.length();
+ auto len = str.length();
while (len--)
{
CHAR ch = str[len];
@@ -313,7 +313,7 @@ class ValidatorAlphaNumSpace : public ValidatorImpl
{
LLLocale locale(LLLocale::USER_LOCALE);
- S32 len = str.length();
+ auto len = str.length();
while (len--)
{
CHAR ch = str[len];
@@ -341,7 +341,7 @@ class ValidatorASCIIPrintableNoPipe : public ValidatorImpl
template <class CHAR>
bool validate(const std::basic_string<CHAR>& str)
{
- S32 len = str.length();
+ auto len = str.length();
while (len--)
{
CHAR ch = str[len];
@@ -368,7 +368,7 @@ class ValidatorASCIIPrintableNoSpace : public ValidatorImpl
template <class CHAR>
bool validate(const std::basic_string<CHAR>& str)
{
- S32 len = str.length();
+ auto len = str.length();
while (len--)
{
CHAR ch = str[len];
@@ -395,7 +395,7 @@ protected:
template <class CHAR>
bool validate(const std::basic_string<CHAR>& str)
{
- S32 len = str.length();
+ auto len = str.length();
while (len--)
{
CHAR ch = str[len];
@@ -441,7 +441,7 @@ class ValidatorASCIIWithNewLine : public ValidatorImpl
template <class CHAR>
bool validate(const std::basic_string<CHAR>& str)
{
- S32 len = str.length();
+ auto len = str.length();
while (len--)
{
CHAR ch = str[len];