summaryrefslogtreecommitdiff
path: root/indra/newview/llclassifiedinfo.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-10-19 12:57:25 -0700
committerSteve Bennetts <steve@lindenlab.com>2009-10-19 12:57:25 -0700
commit9fc74de1a18bbb209ee2524b0c833b3016ffc5e3 (patch)
tree134b4ef690e12793dbfe60167625b65dcec6e996 /indra/newview/llclassifiedinfo.cpp
parent0d6f1d125eb0f6de766d617978a022fc74b4aec7 (diff)
parent909e784deb73d1da73928448cddb219af42ada93 (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;
- }
-
}
-
}