diff options
| author | Oz Linden <oz@lindenlab.com> | 2015-04-07 17:28:05 -0400 | 
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2015-04-07 17:28:05 -0400 | 
| commit | 3a57b18896eacb6fea6680d0eccaaeddb0b700b0 (patch) | |
| tree | 70ca4bccbb2fe28ab5232d920a94fd0246f1b8ad /indra/viewer_components/updater | |
| parent | 66bc5107863e8226e91818cd9d3c075d0514dbe5 (diff) | |
convert llifstream and llofstream to std::ifstream and std::ofstream respectively
Diffstat (limited to 'indra/viewer_components/updater')
| -rwxr-xr-x | indra/viewer_components/updater/llupdatedownloader.cpp | 12 | ||||
| -rwxr-xr-x | indra/viewer_components/updater/llupdaterservice.cpp | 8 | 
2 files changed, 10 insertions, 10 deletions
diff --git a/indra/viewer_components/updater/llupdatedownloader.cpp b/indra/viewer_components/updater/llupdatedownloader.cpp index c42112af80..f868e5cc2c 100755 --- a/indra/viewer_components/updater/llupdatedownloader.cpp +++ b/indra/viewer_components/updater/llupdatedownloader.cpp @@ -270,7 +270,7 @@ void LLUpdateDownloader::Implementation::resume(void)  	}  	mDownloadRecordPath = downloadMarkerPath(); -	llifstream dataStream(mDownloadRecordPath); +	llifstream dataStream(mDownloadRecordPath.c_str());  	if(!dataStream)  	{  		mClient.downloadError("no download marker"); @@ -362,7 +362,7 @@ size_t LLUpdateDownloader::Implementation::onHeader(void * buffer, size_t size)  			LL_INFOS("UpdaterService") << "download size is " << size << LL_ENDL;  			mDownloadData["size"] = LLSD(LLSD::Integer(size)); -			llofstream odataStream(mDownloadRecordPath); +			llofstream odataStream(mDownloadRecordPath.c_str());  			LLSDSerialize::toPrettyXML(mDownloadData, odataStream);  		} catch (std::exception const & e) {  			LL_WARNS("UpdaterService") << "unable to read content length (" @@ -513,7 +513,7 @@ void LLUpdateDownloader::Implementation::resumeDownloading(size_t startByte)  	}  	throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_HTTPHEADER, mHeaderList)); -	mDownloadStream.open(mDownloadData["path"].asString(), +	mDownloadStream.open(mDownloadData["path"].asString().c_str(),  						 std::ios_base::out | std::ios_base::binary | std::ios_base::app);  	start();  } @@ -534,10 +534,10 @@ void LLUpdateDownloader::Implementation::startDownloading(LLURI const & uri, std  		<< " from " << uri.asString() << LL_ENDL;  	LL_INFOS("UpdaterService") << "hash of file is " << hash << LL_ENDL; -	llofstream dataStream(mDownloadRecordPath); +	llofstream dataStream(mDownloadRecordPath.c_str());  	LLSDSerialize::toPrettyXML(mDownloadData, dataStream); -	mDownloadStream.open(filePath, std::ios_base::out | std::ios_base::binary); +	mDownloadStream.open(filePath.c_str(), std::ios_base::out | std::ios_base::binary);  	initializeCurlGet(uri.asString(), true);  	start();  } @@ -570,7 +570,7 @@ bool LLUpdateDownloader::Implementation::validateOrRemove(const std::string& fil  bool LLUpdateDownloader::Implementation::validateDownload(const std::string& filePath)  { -	llifstream fileStream(filePath, std::ios_base::in | std::ios_base::binary); +	llifstream fileStream(filePath.c_str(), std::ios_base::in | std::ios_base::binary);  	if(!fileStream)  	{  		LL_INFOS("UpdaterService") << "can't open " << filePath << ", invalid" << LL_ENDL; diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index cb3be5bbdc..c152493a51 100755 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -285,7 +285,7 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)  {  	bool foundInstall = false; // return true if install is found. -	llifstream update_marker(update_marker_path(),  +	llifstream update_marker(update_marker_path().c_str(),   							 std::ios::in | std::ios::binary);  	if(update_marker.is_open()) @@ -365,7 +365,7 @@ bool LLUpdaterServiceImpl::checkForResume()  	std::string download_marker_path = mUpdateDownloader.downloadMarkerPath();  	if(LLFile::isfile(download_marker_path))  	{ -		llifstream download_marker_stream(download_marker_path,  +		llifstream download_marker_stream(download_marker_path.c_str(),   								 std::ios::in | std::ios::binary);  		if(download_marker_stream.is_open())  		{ @@ -460,7 +460,7 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)  	// Save out the download data to the SecondLifeUpdateReady  	// marker file.  -	llofstream update_marker(update_marker_path()); +	llofstream update_marker(update_marker_path().c_str());  	LLSDSerialize::toPrettyXML(data, update_marker);  	LLSD event; @@ -558,7 +558,7 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)  			LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;  			int requiredValue = 0;   			{ -				llifstream stream(ll_install_failed_marker_path()); +				llifstream stream(ll_install_failed_marker_path().c_str());  				stream >> requiredValue;  				if(stream.fail())  				{  | 
