summaryrefslogtreecommitdiff
path: root/indra/newview/lleventinfo.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-10-23 12:17:30 -0700
committerSteve Bennetts <steve@lindenlab.com>2009-10-23 12:17:30 -0700
commit80b682d4b4dd1256ee09dd3327d2c51e3adee0b5 (patch)
tree751731e4b23e08264caf6436ae2c60cff8094240 /indra/newview/lleventinfo.cpp
parentb43771cad585cb9820941eb1b24b67390eaa9435 (diff)
parent127b428863707c882fbf4d30699321b8a2365644 (diff)
merge
Diffstat (limited to 'indra/newview/lleventinfo.cpp')
-rw-r--r--indra/newview/lleventinfo.cpp36
1 files changed, 10 insertions, 26 deletions
diff --git a/indra/newview/lleventinfo.cpp b/indra/newview/lleventinfo.cpp
index d4175b6c84..9be45d18fb 100644
--- a/indra/newview/lleventinfo.cpp
+++ b/indra/newview/lleventinfo.cpp
@@ -87,35 +87,19 @@ void LLEventInfo::unpack(LLMessageSystem *msg)
}
// static
-void LLEventInfo::loadCategories(LLUserAuth::options_t event_options)
+void LLEventInfo::loadCategories(const LLSD& options)
{
- LLUserAuth::options_t::iterator resp_it;
- for (resp_it = event_options.begin();
- resp_it != event_options.end();
- ++resp_it)
+ for(LLSD::array_const_iterator resp_it = options.beginArray(),
+ end = options.endArray(); resp_it != end; ++resp_it)
{
- const LLUserAuth::response_t& response = *resp_it;
-
- LLUserAuth::response_t::const_iterator option_it;
-
- S32 cat_id = 0;
- option_it = response.find("category_id");
- if (option_it != response.end())
+ LLSD name = (*resp_it)["category_name"];
+ if(name.isDefined())
{
- cat_id = atoi(option_it->second.c_str());
+ LLSD id = (*resp_it)["category_id"];
+ if(id.isDefined())
+ {
+ LLEventInfo::sCategories[id.asInteger()] = name.asString();
+ }
}
- else
- {
- continue;
- }
-
- // Add the category id/name pair
- option_it = response.find("category_name");
- if (option_it != response.end())
- {
- LLEventInfo::sCategories[cat_id] = option_it->second;
- }
-
}
-
}