Use std::as_const (C++17 feature)

This commit is contained in:
Mat Sutcliffe
2021-04-17 22:21:18 +01:00
parent 6d617f40a4
commit 33209fa1eb
42 changed files with 92 additions and 103 deletions

View File

@@ -7,7 +7,8 @@
*/
#include "blackmisc/connectionguard.h"
#include "blackmisc/range.h" // for as_const
#include <utility> // for as_const
#include <QObject>
@@ -45,7 +46,7 @@ namespace BlackMisc
{
if (m_connections.isEmpty()) { return 0; }
int c = 0;
for (const QMetaObject::Connection &con : as_const(m_connections))
for (const QMetaObject::Connection &con : std::as_const(m_connections))
{
if (QObject::disconnect(con)) { c++; }
}