diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llcommandlineparser.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llcommandlineparser.cpp')
-rw-r--r-- | linden/indra/newview/llcommandlineparser.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/linden/indra/newview/llcommandlineparser.cpp b/linden/indra/newview/llcommandlineparser.cpp index 45f33dc..dc6a1e2 100644 --- a/linden/indra/newview/llcommandlineparser.cpp +++ b/linden/indra/newview/llcommandlineparser.cpp | |||
@@ -218,20 +218,20 @@ protected: | |||
218 | //---------------------------------------------------------------------------- | 218 | //---------------------------------------------------------------------------- |
219 | // LLCommandLineParser defintions | 219 | // LLCommandLineParser defintions |
220 | //---------------------------------------------------------------------------- | 220 | //---------------------------------------------------------------------------- |
221 | void LLCommandLineParser::addOptionDesc(const LLString& option_name, | 221 | void LLCommandLineParser::addOptionDesc(const std::string& option_name, |
222 | boost::function1<void, const token_vector_t&> notify_callback, | 222 | boost::function1<void, const token_vector_t&> notify_callback, |
223 | unsigned int token_count, | 223 | unsigned int token_count, |
224 | const LLString& description, | 224 | const std::string& description, |
225 | const LLString& short_name, | 225 | const std::string& short_name, |
226 | bool composing, | 226 | bool composing, |
227 | bool positional, | 227 | bool positional, |
228 | bool last_option) | 228 | bool last_option) |
229 | { | 229 | { |
230 | // Compose the name for boost::po. | 230 | // Compose the name for boost::po. |
231 | // It takes the format "long_name, short name" | 231 | // It takes the format "long_name, short name" |
232 | const LLString comma(","); | 232 | const std::string comma(","); |
233 | LLString boost_option_name = option_name; | 233 | std::string boost_option_name = option_name; |
234 | if(short_name != LLString::null) | 234 | if(short_name != LLStringUtil::null) |
235 | { | 235 | { |
236 | boost_option_name += comma; | 236 | boost_option_name += comma; |
237 | boost_option_name += short_name; | 237 | boost_option_name += short_name; |
@@ -413,7 +413,7 @@ const LLCommandLineParser::token_vector_t& LLCommandLineParser::getOption(const | |||
413 | // LLControlGroupCLP defintions | 413 | // LLControlGroupCLP defintions |
414 | //---------------------------------------------------------------------------- | 414 | //---------------------------------------------------------------------------- |
415 | void setControlValueCB(const LLCommandLineParser::token_vector_t& value, | 415 | void setControlValueCB(const LLCommandLineParser::token_vector_t& value, |
416 | const LLString& opt_name, | 416 | const std::string& opt_name, |
417 | LLControlGroup* ctrlGroup) | 417 | LLControlGroup* ctrlGroup) |
418 | { | 418 | { |
419 | if(value.size() > 1) | 419 | if(value.size() > 1) |
@@ -442,7 +442,7 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, | |||
442 | { | 442 | { |
443 | // There's a token. check the string for true/false/1/0 etc. | 443 | // There's a token. check the string for true/false/1/0 etc. |
444 | BOOL result = false; | 444 | BOOL result = false; |
445 | BOOL gotSet = LLString::convertToBOOL(value[0], result); | 445 | BOOL gotSet = LLStringUtil::convertToBOOL(value[0], result); |
446 | if(gotSet) | 446 | if(gotSet) |
447 | { | 447 | { |
448 | ctrl->setValue(LLSD(result), false); | 448 | ctrl->setValue(LLSD(result), false); |
@@ -489,14 +489,14 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, | |||
489 | } | 489 | } |
490 | } | 490 | } |
491 | 491 | ||
492 | void LLControlGroupCLP::configure(const LLString& config_filename, LLControlGroup* controlGroup) | 492 | void LLControlGroupCLP::configure(const std::string& config_filename, LLControlGroup* controlGroup) |
493 | { | 493 | { |
494 | // This method reads the llsd based config file, and uses it to set | 494 | // This method reads the llsd based config file, and uses it to set |
495 | // members of a control group. | 495 | // members of a control group. |
496 | LLSD clpConfigLLSD; | 496 | LLSD clpConfigLLSD; |
497 | 497 | ||
498 | llifstream input_stream; | 498 | llifstream input_stream; |
499 | input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary); | 499 | input_stream.open(config_filename, std::ios::in | std::ios::binary); |
500 | 500 | ||
501 | if(input_stream.is_open()) | 501 | if(input_stream.is_open()) |
502 | { | 502 | { |
@@ -508,13 +508,13 @@ void LLControlGroupCLP::configure(const LLString& config_filename, LLControlGrou | |||
508 | LLSD::String long_name = option_itr->first; | 508 | LLSD::String long_name = option_itr->first; |
509 | LLSD option_params = option_itr->second; | 509 | LLSD option_params = option_itr->second; |
510 | 510 | ||
511 | LLString desc("n/a"); | 511 | std::string desc("n/a"); |
512 | if(option_params.has("desc")) | 512 | if(option_params.has("desc")) |
513 | { | 513 | { |
514 | desc = option_params["desc"].asString(); | 514 | desc = option_params["desc"].asString(); |
515 | } | 515 | } |
516 | 516 | ||
517 | LLString short_name = LLString::null; | 517 | std::string short_name = LLStringUtil::null; |
518 | if(option_params.has("short")) | 518 | if(option_params.has("short")) |
519 | { | 519 | { |
520 | short_name = option_params["short"].asString(); | 520 | short_name = option_params["short"].asString(); |
@@ -547,7 +547,7 @@ void LLControlGroupCLP::configure(const LLString& config_filename, LLControlGrou | |||
547 | boost::function1<void, const token_vector_t&> callback; | 547 | boost::function1<void, const token_vector_t&> callback; |
548 | if(option_params.has("map-to") && (NULL != controlGroup)) | 548 | if(option_params.has("map-to") && (NULL != controlGroup)) |
549 | { | 549 | { |
550 | LLString controlName = option_params["map-to"].asString(); | 550 | std::string controlName = option_params["map-to"].asString(); |
551 | callback = boost::bind(setControlValueCB, _1, | 551 | callback = boost::bind(setControlValueCB, _1, |
552 | controlName, controlGroup); | 552 | controlName, controlGroup); |
553 | } | 553 | } |