internal: Remove all .c_str() calls when using std::vformat (#3198)
Signed-off-by: pdamianik <39028343+pdamianik@users.noreply.github.com>
This commit is contained in:
parent
60c01dab01
commit
8c83852704
26 changed files with 199 additions and 205 deletions
|
|
@ -210,7 +210,7 @@ float getPlusMinusKeywordResult(std::string source, float relative) {
|
|||
try {
|
||||
return relative + stof(source);
|
||||
} catch (...) {
|
||||
Debug::log(ERR, "Invalid arg \"{}\" in getPlusMinusKeywordResult!", source.c_str());
|
||||
Debug::log(ERR, "Invalid arg \"{}\" in getPlusMinusKeywordResult!", source);
|
||||
return INT_MAX;
|
||||
}
|
||||
}
|
||||
|
|
@ -537,7 +537,7 @@ void logSystemInfo() {
|
|||
#else
|
||||
const std::string GPUINFO = execAndGet("lspci -vnn | grep VGA");
|
||||
#endif
|
||||
Debug::log(LOG, "GPU information:\n{}\n", GPUINFO.c_str());
|
||||
Debug::log(LOG, "GPU information:\n{}\n", GPUINFO);
|
||||
|
||||
if (GPUINFO.contains("NVIDIA")) {
|
||||
Debug::log(WARN, "Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.\n");
|
||||
|
|
@ -546,7 +546,7 @@ void logSystemInfo() {
|
|||
// log etc
|
||||
Debug::log(LOG, "os-release:");
|
||||
|
||||
Debug::log(NONE, "{}", execAndGet("cat /etc/os-release").c_str());
|
||||
Debug::log(NONE, "{}", execAndGet("cat /etc/os-release"));
|
||||
}
|
||||
|
||||
void matrixProjection(float mat[9], int w, int h, wl_output_transform tr) {
|
||||
|
|
@ -590,8 +590,8 @@ int64_t getPPIDof(int64_t pid) {
|
|||
|
||||
return 0;
|
||||
#else
|
||||
std::string dir = "/proc/" + std::to_string(pid) + "/status";
|
||||
FILE* infile;
|
||||
std::string dir = "/proc/" + std::to_string(pid) + "/status";
|
||||
FILE* infile;
|
||||
|
||||
infile = fopen(dir.c_str(), "r");
|
||||
if (!infile)
|
||||
|
|
@ -702,7 +702,7 @@ std::vector<SCallstackFrameInfo> getBacktrace() {
|
|||
}
|
||||
|
||||
void throwError(const std::string& err) {
|
||||
Debug::log(CRIT, "Critical error thrown: {}", err.c_str());
|
||||
Debug::log(CRIT, "Critical error thrown: {}", err);
|
||||
throw std::runtime_error(err);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ void CMonitor::onDisconnect() {
|
|||
m_aLayerSurfaceLayers[i].clear();
|
||||
}
|
||||
|
||||
Debug::log(LOG, "Removed monitor {}!", szName.c_str());
|
||||
Debug::log(LOG, "Removed monitor {}!", szName);
|
||||
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName});
|
||||
EMIT_HOOK_EVENT("monitorRemoved", this);
|
||||
|
|
@ -356,7 +356,7 @@ void CMonitor::setupDefaultWS(const SMonitorRule& monitorRule) {
|
|||
WORKSPACEID = g_pCompositor->m_vWorkspaces.size() + 1;
|
||||
newDefaultWorkspaceName = std::to_string(WORKSPACEID);
|
||||
|
||||
Debug::log(LOG, "Invalid workspace= directive name in monitor parsing, workspace name \"{}\" is invalid.", g_pConfigManager->getDefaultWorkspaceFor(szName).c_str());
|
||||
Debug::log(LOG, "Invalid workspace= directive name in monitor parsing, workspace name \"{}\" is invalid.", g_pConfigManager->getDefaultWorkspaceFor(szName));
|
||||
}
|
||||
|
||||
auto PNEWWORKSPACE = g_pCompositor->getWorkspaceByID(WORKSPACEID);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ CHyprWLListener::~CHyprWLListener() {
|
|||
|
||||
void CHyprWLListener::removeCallback() {
|
||||
if (isConnected()) {
|
||||
Debug::log(LOG, "Callback {:x} -> {:x}, {} removed.", (uintptr_t)&m_pCallback, (uintptr_t)&m_pOwner, m_szAuthor.c_str());
|
||||
Debug::log(LOG, "Callback {:x} -> {:x}, {} removed.", (uintptr_t)&m_pCallback, (uintptr_t)&m_pOwner, m_szAuthor);
|
||||
wl_list_remove(&m_swWrapper.m_sListener.link);
|
||||
wl_list_init(&m_swWrapper.m_sListener.link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue