diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-08-26 17:25:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 17:25:39 +0200 |
| commit | 8d6c18076f3268a6c85c6085d29f898267028101 (patch) | |
| tree | 9db19e850b0a3e2c5d20d5ca2ad5f9878eca89b1 /src/protocols/DataDeviceWlr.cpp | |
| parent | 9c5a37a797ea1f1829859ab5b07016b2f27f739c (diff) | |
core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we
can.
Diffstat (limited to 'src/protocols/DataDeviceWlr.cpp')
| -rw-r--r-- | src/protocols/DataDeviceWlr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/DataDeviceWlr.cpp b/src/protocols/DataDeviceWlr.cpp index ad6ee89a..dce64508 100644 --- a/src/protocols/DataDeviceWlr.cpp +++ b/src/protocols/DataDeviceWlr.cpp @@ -291,7 +291,7 @@ void CDataDeviceWLRProtocol::sendSelectionToDevice(SP<CWLRDataDevice> dev, SP<ID } void CDataDeviceWLRProtocol::setSelection(SP<IDataSource> source, bool primary) { - for (auto& o : m_vOffers) { + for (auto const& o : m_vOffers) { if (o->source && o->source->hasDnd()) continue; if (o->primary != primary) @@ -302,7 +302,7 @@ void CDataDeviceWLRProtocol::setSelection(SP<IDataSource> source, bool primary) if (!source) { LOGM(LOG, "resetting {}selection", primary ? "primary " : " "); - for (auto& d : m_vDevices) { + for (auto const& d : m_vDevices) { sendSelectionToDevice(d, nullptr, primary); } @@ -311,7 +311,7 @@ void CDataDeviceWLRProtocol::setSelection(SP<IDataSource> source, bool primary) LOGM(LOG, "New {}selection for data source {:x}", primary ? "primary" : "", (uintptr_t)source.get()); - for (auto& d : m_vDevices) { + for (auto const& d : m_vDevices) { sendSelectionToDevice(d, source, primary); } } |
