Fixes, mainly for Clang/Mac, from Cinder.

This commit is contained in:
Inusaito Sayori
2014-03-24 16:56:10 -04:00
parent 924011f36e
commit 5affacab70
19 changed files with 80 additions and 38 deletions

View File

@@ -304,6 +304,8 @@ const std::string MARKER_FILE_NAME("Singularity.exec_marker");
const std::string ERROR_MARKER_FILE_NAME("Singularity.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("Singularity.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("Singularity.logout_marker");
const std::string LOG_FILE("Singularity.log");
extern const std::string OLD_LOG_FILE("Singularity.old");
static BOOL gDoDisconnect = FALSE;
static std::string gLaunchFileOnQuit;
@@ -1946,13 +1948,11 @@ bool LLAppViewer::initLogging()
LLError::setFatalFunction(errorCallback);
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"Singularity.old");
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, OLD_LOG_FILE);
LLFile::remove(old_log_file);
// Rename current log file to ".old"
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"Singularity.log");
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOG_FILE);
LLFile::rename(log_file, old_log_file);
// Set the log file to Singularity.log
@@ -2664,7 +2664,7 @@ void LLAppViewer::writeSystemInfo()
// that the crash report will go to the proper location in the case of a
// prior freeze.
std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl");
if(crashHostUrl != "")
if (!crashHostUrl.empty())
{
gDebugInfo["CrashHostUrl"] = crashHostUrl;
}
@@ -2725,7 +2725,7 @@ void LLAppViewer::handleViewerCrash()
// Insert crash host url (url to post crash log to) if configured.
std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl");
if(crashHostUrl != "")
if (!crashHostUrl.empty())
{
gDebugInfo["Dynamic"]["CrashHostUrl"] = crashHostUrl;
}