summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluriparser.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-06-08 16:33:02 -0400
committerOz Linden <oz@lindenlab.com>2015-06-08 16:33:02 -0400
commit949942c730b0b7463338c2cb3bc411ac12f4f648 (patch)
tree159b9cf6bb6a9de9b538f17e3d721be25a15b79a /indra/llcommon/lluriparser.cpp
parenta219cf1c98527faa0e7addeb9660f679208bb0e7 (diff)
parentf3c58f765c0168f25bb13c4427e34b4bdad2f671 (diff)
merge changes for 3.7.29-release
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();