summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-04-07 17:28:05 -0400
committerOz Linden <oz@lindenlab.com>2015-04-07 17:28:05 -0400
commit3a57b18896eacb6fea6680d0eccaaeddb0b700b0 (patch)
tree70ca4bccbb2fe28ab5232d920a94fd0246f1b8ad /indra/llui
parent66bc5107863e8226e91818cd9d3c075d0514dbe5 (diff)
convert llifstream and llofstream to std::ifstream and std::ofstream respectively
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/llspellcheck.cpp19
-rw-r--r--indra/llui/llviewereventrecorder.cpp2
2 files changed, 12 insertions, 9 deletions
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 250372da5b..0db4281059 100755
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -144,12 +144,14 @@ void LLSpellChecker::refreshDictionaryMap()
const std::string user_path = getDictionaryUserPath();
// Load dictionary information (file name, friendly name, ...)
- llifstream user_file(user_path + DICT_FILE_MAIN, std::ios::binary);
+ std::string user_filename(user_path + DICT_FILE_MAIN);
+ llifstream user_file(user_filename.c_str(), std::ios::binary);
if ( (!user_file.is_open())
|| (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXMLDocument(sDictMap, user_file))
|| (0 == sDictMap.size()) )
{
- llifstream app_file(app_path + DICT_FILE_MAIN, std::ios::binary);
+ std::string app_filename(app_path + DICT_FILE_MAIN);
+ llifstream app_file(app_filename.c_str(), std::ios::binary);
if ( (!app_file.is_open())
|| (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXMLDocument(sDictMap, app_file))
|| (0 == sDictMap.size()) )
@@ -159,7 +161,7 @@ void LLSpellChecker::refreshDictionaryMap()
}
// Load user installed dictionary information
- llifstream custom_file(user_path + DICT_FILE_USER, std::ios::binary);
+ llifstream custom_file(user_filename.c_str(), std::ios::binary);
if (custom_file.is_open())
{
LLSD custom_dict_map;
@@ -215,7 +217,7 @@ void LLSpellChecker::addToDictFile(const std::string& dict_path, const std::stri
if (gDirUtilp->fileExists(dict_path))
{
- llifstream file_in(dict_path, std::ios::in);
+ llifstream file_in(dict_path.c_str(), std::ios::in);
if (file_in.is_open())
{
std::string word; int line_num = 0;
@@ -238,7 +240,7 @@ void LLSpellChecker::addToDictFile(const std::string& dict_path, const std::stri
word_list.push_back(word);
- llofstream file_out(dict_path, std::ios::out | std::ios::trunc);
+ llofstream file_out(dict_path.c_str(), std::ios::out | std::ios::trunc);
if (file_out.is_open())
{
file_out << word_list.size() << std::endl;
@@ -352,7 +354,7 @@ void LLSpellChecker::initHunspell(const std::string& dict_language)
if (gDirUtilp->fileExists(user_path + DICT_FILE_IGNORE))
{
- llifstream file_in(user_path + DICT_FILE_IGNORE, std::ios::in);
+ llifstream file_in((user_path + DICT_FILE_IGNORE).c_str(), std::ios::in);
if (file_in.is_open())
{
std::string word; int idxLine = 0;
@@ -463,7 +465,8 @@ void LLSpellChecker::removeDictionary(const std::string& dict_language)
LLSD LLSpellChecker::loadUserDictionaryMap()
{
LLSD dict_map;
- llifstream dict_file(getDictionaryUserPath() + DICT_FILE_USER, std::ios::binary);
+ std::string dict_filename(getDictionaryUserPath() + DICT_FILE_USER);
+ llifstream dict_file(dict_filename.c_str(), std::ios::binary);
if (dict_file.is_open())
{
LLSDSerialize::fromXMLDocument(dict_map, dict_file);
@@ -475,7 +478,7 @@ LLSD LLSpellChecker::loadUserDictionaryMap()
// static
void LLSpellChecker::saveUserDictionaryMap(const LLSD& dict_map)
{
- llofstream dict_file(getDictionaryUserPath() + DICT_FILE_USER, std::ios::trunc);
+ llofstream dict_file((getDictionaryUserPath() + DICT_FILE_USER).c_str(), std::ios::trunc);
if (dict_file.is_open())
{
LLSDSerialize::toPrettyXML(dict_map, dict_file);
diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp
index c5a4354f32..9fe6a542b4 100644
--- a/indra/llui/llviewereventrecorder.cpp
+++ b/indra/llui/llviewereventrecorder.cpp
@@ -50,7 +50,7 @@ bool LLViewerEventRecorder::displayViewerEventRecorderMenuItems() {
void LLViewerEventRecorder::setEventLoggingOn() {
if (! mLog.is_open()) {
- mLog.open(mLogFilename, llofstream::out);
+ mLog.open(mLogFilename.c_str(), std::ios_base::out);
}
logEvents=true;
LL_DEBUGS() << "LLViewerEventRecorder::setEventLoggingOn event logging turned on" << LL_ENDL;