1
0
mirror of https://invent.kde.org/network/krfb synced 2024-07-01 07:24:29 +00:00

We can use std::as_const

This commit is contained in:
Laurent Montel 2021-08-31 08:42:22 +02:00
parent 23c0218f3d
commit a9241dfe88
2 changed files with 3 additions and 3 deletions

View File

@ -605,7 +605,7 @@ QList<QRect> XCBFrameBuffer::modifiedTiles() {
} else {
// not using shared memory
// will use just xcb_image_get() and copy pixels
for (const QRect& r : qAsConst(tiles)) {
for (const QRect& r : std::as_const(tiles)) {
// I did not find XGetSubImage() analog in XCB!!
// need function that copies pixels from one image to another
xcb_image_t *damagedImage = xcb_image_get(

View File

@ -133,7 +133,7 @@ void RfbServerManager::init()
void RfbServerManager::updateFrameBuffer()
{
for (RfbServer *server : qAsConst(d->servers)) {
for (RfbServer *server : std::as_const(d->servers)) {
server->updateFrameBuffer(d->fb->data(), d->fb->width(), d->fb->height(), d->fb->depth());
}
}
@ -143,7 +143,7 @@ void RfbServerManager::updateScreens()
QList<QRect> rects = d->fb->modifiedTiles();
QPoint currentCursorPos = QCursor::pos();
for (RfbServer* server : qAsConst(d->servers)) {
for (RfbServer* server : std::as_const(d->servers)) {
server->updateScreen(rects);
server->updateCursorPosition(currentCursorPos);
}