summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprCtl.cpp8
-rw-r--r--src/debug/HyprDebugOverlay.cpp8
-rw-r--r--src/debug/HyprNotificationOverlay.cpp4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index c8cc5c59..77f54c2b 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -516,7 +516,7 @@ static std::string layersRequest(eHyprCtlOutputFormat format, std::string reques
trimTrailingComma(result);
- if (level.size() > 0)
+ if (!level.empty())
result += "\n ";
result += "],";
@@ -1144,7 +1144,7 @@ static std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in)
Debug::log(LOG, "Hyprctl: keyword {} : {}", COMMAND, VALUE);
- if (retval == "")
+ if (retval.empty())
return "ok";
return retval;
@@ -1528,7 +1528,7 @@ static std::string dispatchPlugin(eHyprCtlOutputFormat format, std::string reque
if (format == eHyprCtlOutputFormat::FORMAT_JSON) {
result += "[";
- if (PLUGINS.size() == 0)
+ if (PLUGINS.empty())
return "[]";
for (auto const& p : PLUGINS) {
@@ -1546,7 +1546,7 @@ static std::string dispatchPlugin(eHyprCtlOutputFormat format, std::string reque
trimTrailingComma(result);
result += "]";
} else {
- if (PLUGINS.size() == 0)
+ if (PLUGINS.empty())
return "no plugins loaded";
for (auto const& p : PLUGINS) {
diff --git a/src/debug/HyprDebugOverlay.cpp b/src/debug/HyprDebugOverlay.cpp
index 332800dd..6c5d8000 100644
--- a/src/debug/HyprDebugOverlay.cpp
+++ b/src/debug/HyprDebugOverlay.cpp
@@ -83,7 +83,7 @@ int CHyprMonitorDebugOverlay::draw(int offset) {
avgFrametime += ft;
}
float varFrametime = maxFrametime - minFrametime;
- avgFrametime /= m_lastFrametimes.size() == 0 ? 1 : m_lastFrametimes.size();
+ avgFrametime /= m_lastFrametimes.empty() ? 1 : m_lastFrametimes.size();
float avgRenderTime = 0;
float maxRenderTime = 0;
@@ -96,7 +96,7 @@ int CHyprMonitorDebugOverlay::draw(int offset) {
avgRenderTime += rt;
}
float varRenderTime = maxRenderTime - minRenderTime;
- avgRenderTime /= m_lastRenderTimes.size() == 0 ? 1 : m_lastRenderTimes.size();
+ avgRenderTime /= m_lastRenderTimes.empty() ? 1 : m_lastRenderTimes.size();
float avgRenderTimeNoOverlay = 0;
float maxRenderTimeNoOverlay = 0;
@@ -109,7 +109,7 @@ int CHyprMonitorDebugOverlay::draw(int offset) {
avgRenderTimeNoOverlay += rt;
}
float varRenderTimeNoOverlay = maxRenderTimeNoOverlay - minRenderTimeNoOverlay;
- avgRenderTimeNoOverlay /= m_lastRenderTimes.size() == 0 ? 1 : m_lastRenderTimes.size();
+ avgRenderTimeNoOverlay /= m_lastRenderTimes.empty() ? 1 : m_lastRenderTimes.size();
float avgAnimMgrTick = 0;
float maxAnimMgrTick = 0;
@@ -122,7 +122,7 @@ int CHyprMonitorDebugOverlay::draw(int offset) {
avgAnimMgrTick += at;
}
float varAnimMgrTick = maxAnimMgrTick - minAnimMgrTick;
- avgAnimMgrTick /= m_lastAnimationTicks.size() == 0 ? 1 : m_lastAnimationTicks.size();
+ avgAnimMgrTick /= m_lastAnimationTicks.empty() ? 1 : m_lastAnimationTicks.size();
const float FPS = 1.f / (avgFrametime / 1000.f); // frametimes are in ms
const float idealFPS = m_lastFrametimes.size();
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index bfa5c4e4..c50abfe6 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -23,7 +23,7 @@ static inline auto iconBackendFromLayout(PangoLayout* layout) {
CHyprNotificationOverlay::CHyprNotificationOverlay() {
static auto P = g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) {
- if (m_notifications.size() == 0)
+ if (m_notifications.empty())
return;
g_pHyprRenderer->damageBox(m_lastDamage);
@@ -210,7 +210,7 @@ void CHyprNotificationOverlay::draw(PHLMONITOR pMonitor) {
}
// Draw the notifications
- if (m_notifications.size() == 0)
+ if (m_notifications.empty())
return;
// Render to the monitor