minimal changes to compile on Xcode 6.2

master
Oz Linden 2015-04-14 05:00:58 -04:00
parent a8ef252571
commit bef5a95caf
2 changed files with 6 additions and 25 deletions

View File

@ -118,38 +118,19 @@ void LLUriParser::fragment(const std::string& s)
void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
{
str = "";
if(&textRange == 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));
}
if(textRange.first == NULL)
else
{
return;
}
if(textRange.afterLast == NULL)
{
return;
}
S32 len = textRange.afterLast - textRange.first;
if (len)
{
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();

View File

@ -191,7 +191,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
if (start < match_start || match_entry == NULL)
{
if((mLLUrlEntryInvalidSLURL == *it))
if (mLLUrlEntryInvalidSLURL == *it)
{
if(url_entry && url_entry->isSLURLvalid(text.substr(start, end - start + 1)))
{