diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
commit | 25c10ed028da5c547b11f1f461916897272b0e6d (patch) | |
tree | 350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/newview/llagentpilot.cpp | |
parent | 6dd125d375b38455997a0c4b8747659f4c2351aa (diff) |
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llagentpilot.cpp')
-rw-r--r-- | indra/newview/llagentpilot.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index 136afb78aa..679cd1688e 100644 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -60,10 +60,13 @@ LLAgentPilot::~LLAgentPilot() { } -void LLAgentPilot::load(const char *filename) +void LLAgentPilot::load(const std::string& filename) { - if(!filename) return; - + if(filename.empty()) + { + return; + } + llifstream file(filename); if (!file) @@ -81,8 +84,7 @@ void LLAgentPilot::load(const char *filename) file >> num_actions; - S32 i; - for (i = 0; i < num_actions; i++) + for (S32 i = 0; i < num_actions; i++) { S32 action_type; Action new_action; @@ -95,10 +97,10 @@ void LLAgentPilot::load(const char *filename) file.close(); } -void LLAgentPilot::save(const char *filename) +void LLAgentPilot::save(const std::string& filename) { llofstream file; - file.open(filename); /*Flawfinder: ignore*/ + file.open(filename); if (!file) { @@ -128,7 +130,7 @@ void LLAgentPilot::startRecord() void LLAgentPilot::stopRecord() { gAgentPilot.addAction(STRAIGHT); - gAgentPilot.save(gSavedSettings.getString("StatsPilotFile").c_str()); + gAgentPilot.save(gSavedSettings.getString("StatsPilotFile")); mRecording = FALSE; } |