scripted-diff: rename pszThread to thread_name

Since it is now a string_view instead of a const char*, update the
name to reflect that the variable is no longer a "Pointer to
String, Zero-terminated" (psz).

-BEGIN VERIFY SCRIPT-
sed -i s/pszThread/thread_name/ $(git grep -l pszThread src)
-END VERIFY SCRIPT-
This commit is contained in:
stickies-v 2022-09-14 11:00:14 +01:00
parent 200d84d568
commit 26cf9ea8e4
No known key found for this signature in database
GPG key ID: 5CB1CE6E5E66A757
2 changed files with 6 additions and 6 deletions

View file

@ -831,7 +831,7 @@ std::string HelpMessageOpt(const std::string &option, const std::string &message
std::string("\n\n"); std::string("\n\n");
} }
static std::string FormatException(const std::exception* pex, std::string_view pszThread) static std::string FormatException(const std::exception* pex, std::string_view thread_name)
{ {
#ifdef WIN32 #ifdef WIN32
char pszModule[MAX_PATH] = ""; char pszModule[MAX_PATH] = "";
@ -841,15 +841,15 @@ static std::string FormatException(const std::exception* pex, std::string_view p
#endif #endif
if (pex) if (pex)
return strprintf( return strprintf(
"EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, pszThread); "EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, thread_name);
else else
return strprintf( return strprintf(
"UNKNOWN EXCEPTION \n%s in %s \n", pszModule, pszThread); "UNKNOWN EXCEPTION \n%s in %s \n", pszModule, thread_name);
} }
void PrintExceptionContinue(const std::exception* pex, std::string_view pszThread) void PrintExceptionContinue(const std::exception* pex, std::string_view thread_name)
{ {
std::string message = FormatException(pex, pszThread); std::string message = FormatException(pex, thread_name);
LogPrintf("\n\n************************\n%s\n", message); LogPrintf("\n\n************************\n%s\n", message);
tfm::format(std::cerr, "\n\n************************\n%s\n", message); tfm::format(std::cerr, "\n\n************************\n%s\n", message);
} }

View file

@ -51,7 +51,7 @@ bool error(const char* fmt, const Args&... args)
return false; return false;
} }
void PrintExceptionContinue(const std::exception* pex, std::string_view pszThread); void PrintExceptionContinue(const std::exception* pex, std::string_view thread_name);
/** /**
* Ensure file contents are fully committed to disk, using a platform-specific * Ensure file contents are fully committed to disk, using a platform-specific