core: avoid .at() and use [] operator (#9347)

avoid .at() where it makes sense and use [] operator in loops.
This commit is contained in:
Tom Englund 2025-02-06 12:18:04 +01:00 committed by GitHub
parent 868b2b544a
commit f1e32cd122
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 25 additions and 25 deletions

View file

@ -1051,13 +1051,13 @@ void CXWM::readWindowData(SP<CXWaylandSurface> surf) {
};
for (size_t i = 0; i < interestingProps.size(); i++) {
xcb_get_property_cookie_t cookie = xcb_get_property(connection, 0, surf->xID, interestingProps.at(i), XCB_ATOM_ANY, 0, 2048);
xcb_get_property_cookie_t cookie = xcb_get_property(connection, 0, surf->xID, interestingProps[i], XCB_ATOM_ANY, 0, 2048);
xcb_get_property_reply_t* reply = xcb_get_property_reply(connection, cookie, nullptr);
if (!reply) {
Debug::log(ERR, "[xwm] Failed to get window property");
continue;
}
readProp(surf, interestingProps.at(i), reply);
readProp(surf, interestingProps[i], reply);
free(reply);
}
}