diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-24 08:55:20 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-24 08:55:20 -0400 |
commit | 3ae8a821c3b627f3b02df636e7649f28b97d6f57 (patch) | |
tree | 79d5d3f2b262b7f5d60cc6135b80221878aa74b8 /indra/llcommon/lluriparser.cpp | |
parent | 39b17157f9c31a4b911113561d4fc8f86396c430 (diff) | |
parent | fde0868231a25b8c9ce03a86cb53f1738d35688d (diff) |
merge
Diffstat (limited to 'indra/llcommon/lluriparser.cpp')
-rw-r--r-- | indra/llcommon/lluriparser.cpp | 29 |
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(); |