summaryrefslogtreecommitdiff
path: root/indra/newview/llclassifiedinfo.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-10-23 12:15:22 -0700
committerSteve Bennetts <steve@lindenlab.com>2009-10-23 12:15:22 -0700
commit127b428863707c882fbf4d30699321b8a2365644 (patch)
tree728c98bd177635891f0646ccabcf86b70341d4a0 /indra/newview/llclassifiedinfo.cpp
parent0220106ecdecd323854522a5bc3fd6455c60fdfc (diff)
parent2438a9168b117dcabf5e5819f93e08a874735a26 (diff)
merge
Diffstat (limited to 'indra/newview/llclassifiedinfo.cpp')
-rw-r--r--indra/newview/llclassifiedinfo.cpp36
1 files changed, 10 insertions, 26 deletions
diff --git a/indra/newview/llclassifiedinfo.cpp b/indra/newview/llclassifiedinfo.cpp
index 5cf1579d0e..5fcafbeca6 100644
--- a/indra/newview/llclassifiedinfo.cpp
+++ b/indra/newview/llclassifiedinfo.cpp
@@ -38,35 +38,19 @@
LLClassifiedInfo::cat_map LLClassifiedInfo::sCategories;
// static
-void LLClassifiedInfo::loadCategories(LLUserAuth::options_t classified_options)
+void LLClassifiedInfo::loadCategories(const LLSD& options)
{
- LLUserAuth::options_t::iterator resp_it;
- for (resp_it = classified_options.begin();
- resp_it != classified_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())
+ {
+ LLClassifiedInfo::sCategories[id.asInteger()] = name.asString();
+ }
}
- else
- {
- continue;
- }
-
- // Add the category id/name pair
- option_it = response.find("category_name");
- if (option_it != response.end())
- {
- LLClassifiedInfo::sCategories[cat_id] = option_it->second;
- }
-
}
-
}