summaryrefslogtreecommitdiff
path: root/indra/llcrashlogger
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcrashlogger')
-rw-r--r--indra/llcrashlogger/llcrashlock.cpp7
-rw-r--r--indra/llcrashlogger/llcrashlogger.cpp10
-rw-r--r--indra/llcrashlogger/llcrashlogger.h2
3 files changed, 9 insertions, 10 deletions
diff --git a/indra/llcrashlogger/llcrashlock.cpp b/indra/llcrashlogger/llcrashlock.cpp
index 506232ab2a..ecd197b2c1 100644
--- a/indra/llcrashlogger/llcrashlock.cpp
+++ b/indra/llcrashlogger/llcrashlock.cpp
@@ -45,11 +45,10 @@
bool LLCrashLock::isProcessAlive(U32 pid, const std::string& pname)
{
- std::wstring wpname;
- wpname = std::wstring(pname.begin(), pname.end());
+ std::wstring wpname = ll_convert_string_to_wide(pname);
HANDLE snapshot;
- PROCESSENTRY32 pe32;
+ PROCESSENTRY32 pe32{};
bool matched = false;
@@ -65,7 +64,7 @@ bool LLCrashLock::isProcessAlive(U32 pid, const std::string& pname)
{
do {
std::wstring wexecname = pe32.szExeFile;
- std::string execname = std::string(wexecname.begin(), wexecname.end());
+ std::string execname = ll_convert_wide_to_string(wexecname);
if (!wpname.compare(pe32.szExeFile))
{
if (pid == (U32)pe32.th32ProcessID)
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index b36f89b750..b1b698375a 100644
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -50,8 +50,8 @@
#include <curl/curl.h>
#include <openssl/crypto.h>
-BOOL gBreak = false;
-BOOL gSent = false;
+bool gBreak = false;
+bool gSent = false;
int LLCrashLogger::ssl_mutex_count = 0;
LLCoreInt::HttpMutex ** LLCrashLogger::ssl_mutex_list = NULL;
@@ -131,7 +131,7 @@ std::string getStartupStateFromLog(std::string& sllog)
std::string startup_state = "STATE_FIRST";
std::string startup_token = "Startup state changing from ";
- int index = sllog.rfind(startup_token);
+ auto index = sllog.rfind(startup_token);
if (index < 0 || index + startup_token.length() > sllog.length()) {
return startup_state;
}
@@ -187,7 +187,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path)
size_t length=0;
llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
- if(minidump_stream.is_open())
+ if (minidump_stream.is_open())
{
minidump_stream.seekg(0, std::ios::end);
length = (size_t)minidump_stream.tellg();
@@ -207,7 +207,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path)
LL_WARNS("CRASHREPORT") << "failed to open minidump "<<minidump_path<<LL_ENDL;
}
- return (length>0?true:false);
+ return length > 0;
}
void LLCrashLogger::gatherFiles()
diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h
index a5839b4622..e5bf19434a 100644
--- a/indra/llcrashlogger/llcrashlogger.h
+++ b/indra/llcrashlogger/llcrashlogger.h
@@ -77,7 +77,7 @@ protected:
static void ssl_locking_callback(int mode, int type, const char * file, int line);
S32 mCrashBehavior;
- BOOL mCrashInPreviousExec;
+ bool mCrashInPreviousExec;
std::map<std::string, std::string> mFileMap;
std::string mGridName;
LLControlGroup mCrashSettings;