diff options
author | Martin Reddy <lynx@lindenlab.com> | 2009-09-14 20:01:20 +0000 |
---|---|---|
committer | Martin Reddy <lynx@lindenlab.com> | 2009-09-14 20:01:20 +0000 |
commit | 7cd1020f2953b776e1878e7b4e365d4b23e6b07b (patch) | |
tree | ba8006f98808b09df6abcc61e0697c36ac8efa23 /indra/llui/llurlregistry.cpp | |
parent | 1d985532e9f9d9c2f37421549c9d4cf872adf7a3 (diff) |
DEV-39188: Removed the custom support for secondlife:///app/events and
secondlife:///app/classifieds URLs because we do not have handlers for
these SLAPPs in 2.0.
Added support for secondlife://<location/<x>/<y>/<z> URLs, in addition
to the http://slurl.com SLURLs.
Also optimized LLUrlRegistry:findUrl() so that it avoids lots of
expensive regex calls when there is no URL in the text.
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rw-r--r-- | indra/llui/llurlregistry.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 938375ad13..f2d340deb7 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -49,11 +49,10 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntryHTTPLabel()); registerUrl(new LLUrlEntryAgent()); registerUrl(new LLUrlEntryGroup()); - registerUrl(new LLUrlEntryEvent()); - registerUrl(new LLUrlEntryClassified()); registerUrl(new LLUrlEntryParcel()); registerUrl(new LLUrlEntryTeleport()); registerUrl(new LLUrlEntryObjectIM()); + registerUrl(new LLUrlEntryPlace()); registerUrl(new LLUrlEntrySL()); registerUrl(new LLUrlEntrySLLabel()); } @@ -118,8 +117,8 @@ static bool matchRegex(const char *text, boost::regex regex, U32 &start, U32 &en bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb) { - // test for the trivial case of no text and get out fast - if (text.empty()) + // avoid costly regexes if there is clearly no URL in the text + if (text.find("://") == std::string::npos) { return false; } |