summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluriparser.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
commitbb87365c37047a35bf524a98d5a48cdb2d56948e (patch)
tree5b44b30944f794c2e2f78a0990cf56f81d27fa78 /indra/llcommon/lluriparser.cpp
parenta89f3f29a0af37c7f3e78e38acb78f78e99dae78 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge viewer-release, become version 3.7.29
Diffstat (limited to 'indra/llcommon/lluriparser.cpp')
-rw-r--r--indra/llcommon/lluriparser.cpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index 8270c630d8..d98bc297e5 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -118,38 +118,19 @@ void LLUriParser::fragment(const std::string& s)
void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
{
- str = "";
-
- if(&textRange == NULL)
- {
- return;
- }
-
- if(textRange.first == NULL)
- {
- return;
- }
-
- if(textRange.afterLast == NULL)
+ if (textRange.first != NULL && textRange.afterLast != NULL && textRange.first < textRange.afterLast)
{
- return;
+ const ptrdiff_t len = textRange.afterLast - textRange.first;
+ str.assign(textRange.first, static_cast<std::string::size_type>(len));
}
-
- S32 len = textRange.afterLast - textRange.first;
- if (len)
+ else
{
- str.assign(textRange.first, len);
+ str = LLStringUtil::null;
}
}
void LLUriParser::extractParts()
{
- if(&mUri == NULL)
- {
- LL_WARNS() << "mUri is NULL for uri: " << mNormalizedUri << LL_ENDL;
- return;
- }
-
if (mTmpScheme || mNormalizedTmp)
{
mScheme.clear();