diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index 70bcf5353c446d52bda1e86f7f3104f5497cc616..b8a9418dc17291d5e7522c6577c24c02e2506e75 100755 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -153,7 +153,7 @@ int warnif(const std::string& desc, const std::string& filename, int rc, int acc } else { - std::ifstream inf(tf); + llifstream inf(tf); std::string line; while (std::getline(inf, line)) { diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index 1fc821d9a9622c3cb589ff7ec7b85770fea9cbc6..8bf177550462577feac0a7e7eab55d4b709f9798 100755 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -132,8 +132,8 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std } // Open baseline and current target, exit if one is inexistent - std::ifstream base_is(baseline.c_str()); - std::ifstream target_is(target.c_str()); + llifstream base_is(baseline.c_str()); + llifstream target_is(target.c_str()); if (!base_is.is_open() || !target_is.is_open()) { LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL; @@ -151,7 +151,7 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std target_is.close(); //output comparision - std::ofstream os(output.c_str()); + llofstream os(output.c_str()); os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n"; for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ; @@ -212,7 +212,7 @@ void LLMetricPerformanceTesterBasic::addMetric(std::string str) } /*virtual*/ -void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) +void LLMetricPerformanceTesterBasic::analyzePerformance(llofstream* os, LLSD* base, LLSD* current) { resetCurrentCount() ; @@ -254,14 +254,14 @@ void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD* } /*virtual*/ -void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current) +void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current) { *os << llformat(" ,%s, %d, %d, %d, %.4f\n", metric_string.c_str(), v_base, v_current, v_current - v_base, (v_base != 0) ? 100.f * v_current / v_base : 0) ; } /*virtual*/ -void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current) +void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current) { *os << llformat(" ,%s, %.4f, %.4f, %.4f, %.4f\n", metric_string.c_str(), v_base, v_current, v_current - v_base, (fabs(v_base) > 0.0001f) ? 100.f * v_current / v_base : 0.f ) ; @@ -293,7 +293,7 @@ LLMetricPerformanceTesterWithSession::~LLMetricPerformanceTesterWithSession() } /*virtual*/ -void LLMetricPerformanceTesterWithSession::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) +void LLMetricPerformanceTesterWithSession::analyzePerformance(llofstream* os, LLSD* base, LLSD* current) { // Load the base session resetCurrentCount() ; diff --git a/indra/llcommon/llmetricperformancetester.h b/indra/llcommon/llmetricperformancetester.h index 1a18cdf36fbf3a55e31f6c7c6cf5bd6a422332ab..2141e506ccb1256ad7ade715b8c8d25d773dd0b4 100755 --- a/indra/llcommon/llmetricperformancetester.h +++ b/indra/llcommon/llmetricperformancetester.h @@ -60,7 +60,7 @@ public: * By default, compares the test results against the baseline one by one, item by item, * in the increasing order of the LLSD record counter, starting from the first one. */ - virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ; + virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ; static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ; @@ -93,8 +93,8 @@ protected: * @param[in] v_base - Base value of the metric. * @param[in] v_current - Current value of the metric. */ - virtual void compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current) ; - virtual void compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current) ; + virtual void compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current) ; + virtual void compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current) ; /** * @brief Reset internal record count. Count starts with 1. @@ -181,7 +181,7 @@ public: * This will be loading the base and current sessions and compare them using the virtual * abstract methods loadTestSession() and compareTestSessions() */ - virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ; + virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ; protected: /** @@ -205,7 +205,7 @@ protected: * @brief Compare the base session and the target session. Assumes base and current sessions have been loaded. * @param[out] os - The comparison result as a standard stream */ - virtual void compareTestSessions(std::ofstream* os) = 0; + virtual void compareTestSessions(llofstream* os) = 0; LLTestSession* mBaseSessionp; LLTestSession* mCurrentSessionp; diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 5231aa3f565b708a9f74dd72bc3f27a1094908f1..f622280bab0615b847dd5fc717cdc61b9135e4df 100755 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -151,7 +151,7 @@ std::string getStartupStateFromLog(std::string& sllog) bool LLCrashLogger::readDebugFromXML(LLSD& dest, const std::string& filename ) { std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename); - std::ifstream debug_log_file(db_file_name.c_str()); + llifstream debug_log_file(db_file_name.c_str()); // Look for it in the debug_info.log file if (debug_log_file.is_open()) @@ -177,7 +177,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path) { size_t length=0; - std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); + llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); if(minidump_stream.is_open()) { minidump_stream.seekg(0, std::ios::end); @@ -277,7 +277,7 @@ void LLCrashLogger::gatherFiles() for(std::map<std::string, std::string>::iterator itr = mFileMap.begin(); itr != mFileMap.end(); ++itr) { - std::ifstream f((*itr).second.c_str()); + llifstream f((*itr).second.c_str()); if(!f.is_open()) { LL_INFOS("CRASHREPORT") << "Can't find file " << (*itr).second << LL_ENDL; @@ -324,7 +324,7 @@ void LLCrashLogger::gatherFiles() if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) ) { std::string fullname = pathname + *iter; - std::ifstream fdat( fullname.c_str(), std::ifstream::binary); + llifstream fdat( fullname.c_str(), std::ios_base::binary); if (fdat) { char buf[5]; @@ -451,7 +451,7 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir) updateApplication("Sending reports..."); - std::ofstream out_file(report_file.c_str()); + llofstream out_file(report_file.c_str()); LLSDSerialize::toPrettyXML(post_data, out_file); out_file.close(); diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index c9ee1c46b26be9969cf7205eb42d3cd8ac6950b4..b8a7d4e8daed686d793fa169ea489593c93c9e78 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -1081,7 +1081,7 @@ bool LLDAELoader::OpenFile(const std::string& filename) std::string LLDAELoader::preprocessDAE(std::string filename) { // Open a DAE file for some preprocessing (like removing space characters in IDs), see MAINT-5678 - std::ifstream inFile; + llifstream inFile; inFile.open(filename.c_str(), std::ios_base::in); std::stringstream strStream; strStream << inFile.rdbuf(); diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index bfdaced9a430b7862e357086756f91e2f7456683..531b6c628bcc4e2727ac4c16cae1ceab557bcbb4 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -310,7 +310,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) S32 file_size = (S32) stat.st_size; - llifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary); + llifstream ifstream(filename.c_str(), std::ios_base::in | std::ios_base::binary); LLSD data; LLSDSerialize::fromBinary(data, ifstream, file_size); ifstream.close(); diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index e66f5c1b8ece29012bd49f1798c23c4729a5320b..05cf8417913f26ff29f61b610b278fbab7ef13e1 100755 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -62,7 +62,7 @@ static const std::string HEADLESS_VENDOR_STRING("Linden Lab"); static const std::string HEADLESS_RENDERER_STRING("Headless"); static const std::string HEADLESS_VERSION_STRING("1.0"); -std::ofstream gFailLog; +llofstream gFailLog; #if GL_ARB_debug_output diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index ce798b5ee913148bea85f0773191506b0c87260f..040df226a386fe85d1db0195611ddb884067a354 100755 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -46,7 +46,7 @@ extern BOOL gDebugGL; extern BOOL gDebugSession; -extern std::ofstream gFailLog; +extern llofstream gFailLog; #define LL_GL_ERRS LL_ERRS("RenderState") diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8265f234ff0795e0383c0662466a3c31c29f2b00..d536768d610db2e289f7e1ad8e7e7d8cbe93f2b2 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -645,7 +645,7 @@ public: void run() { - std::ofstream os(mFile.c_str()); + llofstream os(mFile.c_str()); while (!LLAppViewer::instance()->isQuitting()) { @@ -3412,7 +3412,7 @@ void getFileList() if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) ) { std::string fullname = pathname + *iter; - std::ifstream fdat( fullname.c_str(), std::ifstream::binary); + llifstream fdat( fullname.c_str(), std::ios_base::binary); if (fdat) { char buf[5]; diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index c719378f55a1d90f4854709c3c18eaefc072184d..5d21a5e8eba440f14eb232cee8ff83f7f7e2bd5b 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -475,7 +475,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t { //read base log into memory S32 i = 0; - std::ifstream is(base.c_str()); + llifstream is(base.c_str()); while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is)) { base_data[i++] = cur; @@ -488,7 +488,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t { //read current log into memory S32 i = 0; - std::ifstream is(target.c_str()); + llifstream is(target.c_str()); while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is)) { cur_data[i++] = cur; @@ -833,8 +833,8 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is) void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target, std::string output) { // Open baseline and current target, exit if one is inexistent - std::ifstream base_is(baseline.c_str()); - std::ifstream target_is(target.c_str()); + llifstream base_is(baseline.c_str()); + llifstream target_is(target.c_str()); if (!base_is.is_open() || !target_is.is_open()) { LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL; @@ -852,7 +852,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target target_is.close(); //output comparison - std::ofstream os(output.c_str()); + llofstream os(output.c_str()); LLSD::Real session_time = current["SessionTime"].asReal(); os << diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 70925dd90207c0808aaea6084191fff27ccc111c..3ebc4849facd7b11668a1d528e4238d3a9805945 100755 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -40,7 +40,7 @@ #include "llwindowsdl.h" // for some X/GTK utils to help with filepickers #endif // LL_SDL -#if LL_LINUX || LL_SOLARIS +#if LL_LINUX #include "llhttpconstants.h" // file picker uses some of thes constants on Linux #endif diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index d4b138c67c1057ddaabd2871fe7342c1c760d858..f4eb07efa29b5123e417550c2786e0efcd1db0d3 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2002,14 +2002,14 @@ void dump_llsd_to_file(const LLSD& content, std::string filename) { if (gSavedSettings.getBOOL("MeshUploadLogXML")) { - std::ofstream of(filename.c_str()); + llofstream of(filename.c_str()); LLSDSerialize::toPrettyXML(content,of); } } LLSD llsd_from_file(std::string filename) { - std::ifstream ifs(filename.c_str()); + llifstream ifs(filename.c_str()); LLSD result; LLSDSerialize::fromXML(result,ifs); return result; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 00bf38d9866a82587219c86288692cd4b3f77c61..4a2c5ab2fc5d55a4055bc71872506d13071e382e 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1209,7 +1209,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) std::string filename = file_picker.getFirstFile(); - std::ifstream fin(filename.c_str()); + llifstream fin(filename.c_str()); std::string line; std::string text; @@ -1247,7 +1247,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { std::string filename = file_picker.getFirstFile(); std::string scriptText=self->mEditor->getText(); - std::ofstream fout(filename.c_str()); + llofstream fout(filename.c_str()); fout<<(scriptText); fout.close(); self->mSaveCallback( self->mUserdata, FALSE ); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index fce831a3d1aabbe6c4324e33fd194731d7415180..33d9eeb5cabfad4e873b291a9757ec59cb875dc9 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -532,7 +532,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name) LL_INFOS("SceneMonitor") << "Saving scene load stats to " << file_name << LL_ENDL; - std::ofstream os(file_name.c_str()); + llofstream os(file_name.c_str()); os << std::setprecision(10); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f2b7570d69c339b9ef059ff8832a91b5f8d23824..b9b0d9d04d610f73fc76acfc92788dce05e365ec 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -4021,7 +4021,7 @@ void LLTexturePipelineTester::updateStablizingTime() } //virtual -void LLTexturePipelineTester::compareTestSessions(std::ofstream* os) +void LLTexturePipelineTester::compareTestSessions(llofstream* os) { LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mBaseSessionp); LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index c60a85619c100a6265b6630e3ecfad4fb2c0742e..d026c6bcdf9947d708253f81a56f3ddb6c92663e 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -778,7 +778,7 @@ private: }; /*virtual*/ LLMetricPerformanceTesterWithSession::LLTestSession* loadTestSession(LLSD* log) ; - /*virtual*/ void compareTestSessions(std::ofstream* os) ; + /*virtual*/ void compareTestSessions(llofstream* os) ; }; #endif diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d678beade3777f717b48b1619d465873b549980c..cc9b9dda3ef60151f89759e4a05d03b40351e105 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7993,7 +7993,7 @@ void dump_sequential_xml(const std::string outprefix, const LLSD& content) { std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml"); std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); - std::ofstream ofs(fullpath.c_str(), std::ios_base::out); + llofstream ofs(fullpath.c_str(), std::ios_base::out); ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY); LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL; }