Commit a9241dfe authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

We can use std::as_const

parent 23c0218f
......@@ -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(
......
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment