summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-02-06 12:18:04 +0100
committerGitHub <noreply@github.com>2025-02-06 11:18:04 +0000
commitf1e32cd122ad64ba7119ee7fe65f7c1074a65b91 (patch)
treefa6f884bcdd1c876c2fb15ef496ee4bc16d936f0 /src/managers
parent868b2b544abb61764089b0e4e9b0fd153a9db26f (diff)
core: avoid .at() and use [] operator (#9347)
avoid .at() where it makes sense and use [] operator in loops.
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/PointerManager.cpp2
-rw-r--r--src/managers/XCursorManager.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp
index 48ef5e16..1c8e9976 100644
--- a/src/managers/PointerManager.cpp
+++ b/src/managers/PointerManager.cpp
@@ -475,7 +475,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
if (flipRB) {
for (size_t i = 0; i < shmBuffer.size(); i += 4) {
- std::swap(shmBuffer.at(i), shmBuffer.at(i + 2)); // little-endian!!!!!!
+ std::swap(shmBuffer[i], shmBuffer[i + 2]); // little-endian!!!!!!
}
}
} else {
diff --git a/src/managers/XCursorManager.cpp b/src/managers/XCursorManager.cpp
index 3473df44..3f554804 100644
--- a/src/managers/XCursorManager.cpp
+++ b/src/managers/XCursorManager.cpp
@@ -482,7 +482,7 @@ std::vector<SP<SXCursors>> CXCursorManager::loadStandardCursors(std::string cons
// load the default xcursor shapes that exist in the theme
for (size_t i = 0; i < XCURSOR_STANDARD_NAMES.size(); ++i) {
- std::string shape{XCURSOR_STANDARD_NAMES.at(i)};
+ std::string shape{XCURSOR_STANDARD_NAMES[i]};
auto xImages = XcursorShapeLoadImages(i << 1 /* wtf xcursor? */, name.c_str(), size);
if (!xImages) {