summaryrefslogtreecommitdiff
path: root/src/managers/CursorManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2024-08-26 20:24:30 +0200
committerGitHub <noreply@github.com>2024-08-26 20:24:30 +0200
commit72c7818ae66a18d126e2b4245d649fe3a93d3b8e (patch)
tree194361ee0d4f92eea809b7904d39f02793c55e13 /src/managers/CursorManager.cpp
parent1ea47950f4262ec1215087948c7275f8e0115af2 (diff)
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
Diffstat (limited to 'src/managers/CursorManager.cpp')
-rw-r--r--src/managers/CursorManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp
index 1c047f85..6f8292f7 100644
--- a/src/managers/CursorManager.cpp
+++ b/src/managers/CursorManager.cpp
@@ -193,7 +193,7 @@ void CCursorManager::setCursorFromName(const std::string& name) {
// fallback to a default if available
constexpr const std::array<const char*, 3> fallbackShapes = {"default", "left_ptr", "left-ptr"};
- for (auto& s : fallbackShapes) {
+ for (auto const& s : fallbackShapes) {
m_sCurrentCursorShapeData = m_pHyprcursor->getShape(s, m_sCurrentStyleInfo);
if (m_sCurrentCursorShapeData.images.size() > 0)
@@ -288,7 +288,7 @@ void CCursorManager::updateTheme() {
static auto PUSEHYPRCURSOR = CConfigValue<Hyprlang::INT>("cursor:enable_hyprcursor");
float highestScale = 1.0;
- for (auto& m : g_pCompositor->m_vMonitors) {
+ for (auto const& m : g_pCompositor->m_vMonitors) {
if (m->scale > highestScale)
highestScale = m->scale;
}
@@ -307,7 +307,7 @@ void CCursorManager::updateTheme() {
setCursorFromName("left_ptr");
- for (auto& m : g_pCompositor->m_vMonitors) {
+ for (auto const& m : g_pCompositor->m_vMonitors) {
m->forceFullFrames = 5;
g_pCompositor->scheduleFrameForMonitor(m.get(), Aquamarine::IOutput::AQ_SCHEDULE_CURSOR_SHAPE);
}