Fix Clazy range-loop-detach warnings
This commit is contained in:
parent
f5f06ae44e
commit
d484ec3ac8
14 changed files with 42 additions and 35 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
QT += core quick network quickcontrols2 svg
|
QT += core quick network quickcontrols2 svg
|
||||||
CONFIG += c++11
|
CONFIG += c++17
|
||||||
|
|
||||||
unix:!macx {
|
unix:!macx {
|
||||||
TARGET = moonlight
|
TARGET = moonlight
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ void AutoUpdateChecker::start()
|
||||||
void AutoUpdateChecker::parseStringToVersionQuad(QString& string, QVector<int>& version)
|
void AutoUpdateChecker::parseStringToVersionQuad(QString& string, QVector<int>& version)
|
||||||
{
|
{
|
||||||
QStringList list = string.split('.');
|
QStringList list = string.split('.');
|
||||||
for (const QString& component : list) {
|
for (const QString& component : std::as_const(list)) {
|
||||||
version.append(component.toInt());
|
version.append(component.toInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +139,7 @@ void AutoUpdateChecker::handleUpdateCheckRequestFinished(QNetworkReply* reply)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (QJsonValueRef updateEntry : array) {
|
for (const auto& updateEntry : std::as_const(array)) {
|
||||||
if (updateEntry.isObject()) {
|
if (updateEntry.isObject()) {
|
||||||
QJsonObject updateObj = updateEntry.toObject();
|
QJsonObject updateObj = updateEntry.toObject();
|
||||||
if (!updateObj.contains("platform") ||
|
if (!updateObj.contains("platform") ||
|
||||||
|
|
|
||||||
|
|
@ -231,17 +231,17 @@ ComputerManager::~ComputerManager()
|
||||||
m_MdnsBrowser = nullptr;
|
m_MdnsBrowser = nullptr;
|
||||||
|
|
||||||
// Interrupt polling
|
// Interrupt polling
|
||||||
for (ComputerPollingEntry* entry : m_PollEntries) {
|
for (ComputerPollingEntry* entry : std::as_const(m_PollEntries)) {
|
||||||
entry->interrupt();
|
entry->interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all polling entries (and associated threads)
|
// Delete all polling entries (and associated threads)
|
||||||
for (ComputerPollingEntry* entry : m_PollEntries) {
|
for (ComputerPollingEntry* entry : std::as_const(m_PollEntries)) {
|
||||||
delete entry;
|
delete entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy all NvComputer objects now that polling is halted
|
// Destroy all NvComputer objects now that polling is halted
|
||||||
for (NvComputer* computer : m_KnownHosts) {
|
for (NvComputer* computer : std::as_const(m_KnownHosts)) {
|
||||||
delete computer;
|
delete computer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -268,7 +268,7 @@ void DelayedFlushThread::run() {
|
||||||
|
|
||||||
// Update the last serialized hosts map under the delayed flush mutex
|
// Update the last serialized hosts map under the delayed flush mutex
|
||||||
m_ComputerManager->m_LastSerializedHosts.clear();
|
m_ComputerManager->m_LastSerializedHosts.clear();
|
||||||
for (const NvComputer* computer : m_ComputerManager->m_KnownHosts) {
|
for (const NvComputer* computer : std::as_const(m_ComputerManager->m_KnownHosts)) {
|
||||||
// Copy the current state of the NvComputer to allow us to check later if we need
|
// Copy the current state of the NvComputer to allow us to check later if we need
|
||||||
// to serialize it again when attribute updates occur.
|
// to serialize it again when attribute updates occur.
|
||||||
QReadLocker computerLock(&computer->lock);
|
QReadLocker computerLock(&computer->lock);
|
||||||
|
|
@ -285,7 +285,7 @@ void DelayedFlushThread::run() {
|
||||||
{
|
{
|
||||||
QReadLocker lock(&m_ComputerManager->m_Lock);
|
QReadLocker lock(&m_ComputerManager->m_Lock);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const NvComputer* computer : m_ComputerManager->m_KnownHosts) {
|
for (const NvComputer* computer : std::as_const(m_ComputerManager->m_KnownHosts)) {
|
||||||
settings.setArrayIndex(i++);
|
settings.setArrayIndex(i++);
|
||||||
computer->serialize(settings, false);
|
computer->serialize(settings, false);
|
||||||
}
|
}
|
||||||
|
|
@ -298,7 +298,7 @@ void DelayedFlushThread::run() {
|
||||||
{
|
{
|
||||||
QReadLocker lock(&m_ComputerManager->m_Lock);
|
QReadLocker lock(&m_ComputerManager->m_Lock);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const NvComputer* computer : m_ComputerManager->m_KnownHosts) {
|
for (const NvComputer* computer : std::as_const(m_ComputerManager->m_KnownHosts)) {
|
||||||
settings.setArrayIndex(i++);
|
settings.setArrayIndex(i++);
|
||||||
computer->serialize(settings, true);
|
computer->serialize(settings, true);
|
||||||
}
|
}
|
||||||
|
|
@ -424,7 +424,7 @@ void ComputerManager::handleMdnsServiceResolved(MdnsPendingComputer* computer,
|
||||||
bool added = false;
|
bool added = false;
|
||||||
|
|
||||||
// Add the host using the IPv4 address
|
// Add the host using the IPv4 address
|
||||||
for (const QHostAddress& address : addresses) {
|
for (const QHostAddress& address : std::as_const(addresses)) {
|
||||||
if (address.protocol() == QAbstractSocket::IPv4Protocol) {
|
if (address.protocol() == QAbstractSocket::IPv4Protocol) {
|
||||||
// NB: We don't just call addNewHost() here with v6Global because the IPv6
|
// NB: We don't just call addNewHost() here with v6Global because the IPv6
|
||||||
// address may not be reachable (if the user hasn't installed the IPv6 helper yet
|
// address may not be reachable (if the user hasn't installed the IPv6 helper yet
|
||||||
|
|
@ -440,7 +440,7 @@ void ComputerManager::handleMdnsServiceResolved(MdnsPendingComputer* computer,
|
||||||
|
|
||||||
if (!added) {
|
if (!added) {
|
||||||
// If we get here, there wasn't an IPv4 address so we'll do it v6-only
|
// If we get here, there wasn't an IPv4 address so we'll do it v6-only
|
||||||
for (const QHostAddress& address : addresses) {
|
for (const QHostAddress& address : std::as_const(addresses)) {
|
||||||
if (address.protocol() == QAbstractSocket::IPv6Protocol) {
|
if (address.protocol() == QAbstractSocket::IPv6Protocol) {
|
||||||
// Use a link-local or site-local address for the "local address"
|
// Use a link-local or site-local address for the "local address"
|
||||||
if (address.isInSubnet(QHostAddress("fe80::"), 10) ||
|
if (address.isInSubnet(QHostAddress("fe80::"), 10) ||
|
||||||
|
|
@ -569,7 +569,7 @@ void ComputerManager::handleAboutToQuit()
|
||||||
|
|
||||||
// Interrupt polling threads immediately, so they
|
// Interrupt polling threads immediately, so they
|
||||||
// avoid making additional requests while quitting
|
// avoid making additional requests while quitting
|
||||||
for (ComputerPollingEntry* entry : m_PollEntries) {
|
for (ComputerPollingEntry* entry : std::as_const(m_PollEntries)) {
|
||||||
entry->interrupt();
|
entry->interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -721,7 +721,7 @@ void ComputerManager::stopPollingAsync()
|
||||||
m_MdnsServer.reset();
|
m_MdnsServer.reset();
|
||||||
|
|
||||||
// Interrupt all threads, but don't wait for them to terminate
|
// Interrupt all threads, but don't wait for them to terminate
|
||||||
for (ComputerPollingEntry* entry : m_PollEntries) {
|
for (ComputerPollingEntry* entry : std::as_const(m_PollEntries)) {
|
||||||
entry->interrupt();
|
entry->interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ public:
|
||||||
// interrupt() should have taken care of this
|
// interrupt() should have taken care of this
|
||||||
Q_ASSERT(m_ActiveThread == nullptr);
|
Q_ASSERT(m_ActiveThread == nullptr);
|
||||||
|
|
||||||
for (QThread* thread : m_InactiveList) {
|
for (QThread* thread : std::as_const(m_InactiveList)) {
|
||||||
thread->wait();
|
thread->wait();
|
||||||
delete thread;
|
delete thread;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@ ComputerSeeker::ComputerSeeker(ComputerManager *manager, QString computerName, Q
|
||||||
m_TimeoutTimer(new QTimer(this))
|
m_TimeoutTimer(new QTimer(this))
|
||||||
{
|
{
|
||||||
// If we know this computer, send a WOL packet to wake it up in case it is asleep.
|
// If we know this computer, send a WOL packet to wake it up in case it is asleep.
|
||||||
for (NvComputer * computer: m_ComputerManager->getComputers()) {
|
const auto computers = m_ComputerManager->getComputers();
|
||||||
|
for (NvComputer* computer : computers) {
|
||||||
if (this->matchComputer(computer)) {
|
if (this->matchComputer(computer)) {
|
||||||
computer->wake();
|
computer->wake();
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +52,8 @@ bool ComputerSeeker::matchComputer(NvComputer *computer) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const NvAddress& addr : computer->uniqueAddresses()) {
|
const auto uniqueAddresses = computer->uniqueAddresses();
|
||||||
|
for (const NvAddress& addr : uniqueAddresses) {
|
||||||
if (addr.address().toLower() == value || addr.toString().toLower() == value) {
|
if (addr.address().toLower() == value || addr.toString().toLower() == value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ NvComputer::NvComputer(NvHTTP& http, QString serverInfo)
|
||||||
QString newMacString = NvHTTP::getXmlString(serverInfo, "mac");
|
QString newMacString = NvHTTP::getXmlString(serverInfo, "mac");
|
||||||
if (newMacString != "00:00:00:00:00:00") {
|
if (newMacString != "00:00:00:00:00:00") {
|
||||||
QStringList macOctets = newMacString.split(':');
|
QStringList macOctets = newMacString.split(':');
|
||||||
for (const QString& macOctet : macOctets) {
|
for (const QString& macOctet : std::as_const(macOctets)) {
|
||||||
this->macAddress.append((char) macOctet.toInt(nullptr, 16));
|
this->macAddress.append((char) macOctet.toInt(nullptr, 16));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -254,14 +254,16 @@ bool NvComputer::wake() const
|
||||||
// case the host has timed out in ARP entries.
|
// case the host has timed out in ARP entries.
|
||||||
QMap<QString, quint16> addressMap;
|
QMap<QString, quint16> addressMap;
|
||||||
QSet<quint16> basePortSet;
|
QSet<quint16> basePortSet;
|
||||||
for (const NvAddress& addr : uniqueAddresses()) {
|
const auto uniqueHostAddresses = uniqueAddresses();
|
||||||
|
for (const NvAddress& addr : uniqueHostAddresses) {
|
||||||
addressMap.insert(addr.address(), addr.port());
|
addressMap.insert(addr.address(), addr.port());
|
||||||
basePortSet.insert(addr.port());
|
basePortSet.insert(addr.port());
|
||||||
}
|
}
|
||||||
addressMap.insert("255.255.255.255", 0);
|
addressMap.insert("255.255.255.255", 0);
|
||||||
|
|
||||||
// Try to broadcast on all available NICs
|
// Try to broadcast on all available NICs
|
||||||
for (const QNetworkInterface& nic : QNetworkInterface::allInterfaces()) {
|
const auto allInterfaces = QNetworkInterface::allInterfaces();
|
||||||
|
for (const QNetworkInterface& nic : allInterfaces) {
|
||||||
// Ensure the interface is up and skip the loopback adapter
|
// Ensure the interface is up and skip the loopback adapter
|
||||||
if ((nic.flags() & QNetworkInterface::IsUp) == 0 ||
|
if ((nic.flags() & QNetworkInterface::IsUp) == 0 ||
|
||||||
(nic.flags() & QNetworkInterface::IsLoopBack) != 0) {
|
(nic.flags() & QNetworkInterface::IsLoopBack) != 0) {
|
||||||
|
|
@ -269,7 +271,8 @@ bool NvComputer::wake() const
|
||||||
}
|
}
|
||||||
|
|
||||||
QHostAddress allNodesMulticast("FF02::1");
|
QHostAddress allNodesMulticast("FF02::1");
|
||||||
for (const QNetworkAddressEntry& addr : nic.addressEntries()) {
|
const auto allInterfaceAddresses = nic.addressEntries();
|
||||||
|
for (const QNetworkAddressEntry& addr : allInterfaceAddresses) {
|
||||||
// Store the scope ID for this NIC if IPv6 is enabled
|
// Store the scope ID for this NIC if IPv6 is enabled
|
||||||
if (!addr.ip().scopeId().isEmpty()) {
|
if (!addr.ip().scopeId().isEmpty()) {
|
||||||
allNodesMulticast.setScopeId(addr.ip().scopeId());
|
allNodesMulticast.setScopeId(addr.ip().scopeId());
|
||||||
|
|
@ -375,13 +378,15 @@ NvComputer::ReachabilityType NvComputer::getActiveAddressReachability() const
|
||||||
Q_ASSERT(!s.localAddress().isNull());
|
Q_ASSERT(!s.localAddress().isNull());
|
||||||
Q_ASSERT(!s.peerAddress().isNull());
|
Q_ASSERT(!s.peerAddress().isNull());
|
||||||
|
|
||||||
for (const QNetworkInterface& nic : QNetworkInterface::allInterfaces()) {
|
const auto allInterfaces = QNetworkInterface::allInterfaces();
|
||||||
|
for (const QNetworkInterface& nic : allInterfaces) {
|
||||||
// Ensure the interface is up
|
// Ensure the interface is up
|
||||||
if ((nic.flags() & QNetworkInterface::IsUp) == 0) {
|
if ((nic.flags() & QNetworkInterface::IsUp) == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const QNetworkAddressEntry& addr : nic.addressEntries()) {
|
const auto allInterfaceAddresses = nic.addressEntries();
|
||||||
|
for (const QNetworkAddressEntry& addr : allInterfaceAddresses) {
|
||||||
if (addr.ip() == s.localAddress()) {
|
if (addr.ip() == s.localAddress()) {
|
||||||
qInfo() << "Found matching interface:" << nic.humanReadableName() << nic.hardwareAddress() << nic.flags();
|
qInfo() << "Found matching interface:" << nic.humanReadableName() << nic.hardwareAddress() << nic.flags();
|
||||||
|
|
||||||
|
|
@ -463,7 +468,7 @@ bool NvComputer::updateAppList(QVector<NvApp> newAppList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Propagate client-side attributes to the new app list
|
// Propagate client-side attributes to the new app list
|
||||||
for (const NvApp& existingApp : appList) {
|
for (const NvApp& existingApp : std::as_const(appList)) {
|
||||||
for (NvApp& newApp : newAppList) {
|
for (NvApp& newApp : newAppList) {
|
||||||
if (existingApp.id == newApp.id) {
|
if (existingApp.id == newApp.id) {
|
||||||
newApp.hidden = existingApp.hidden;
|
newApp.hidden = existingApp.hidden;
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ public:
|
||||||
|
|
||||||
QString getCurrentAppName() const
|
QString getCurrentAppName() const
|
||||||
{
|
{
|
||||||
for (const NvApp& app : m_Computer->appList) {
|
for (const NvApp& app : std::as_const(m_Computer->appList)) {
|
||||||
if (m_Computer->currentGameId == app.id) {
|
if (m_Computer->currentGameId == app.id) {
|
||||||
return app.name;
|
return app.name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ void AppModel::quitRunningApp()
|
||||||
|
|
||||||
bool AppModel::isAppCurrentlyVisible(const NvApp& app)
|
bool AppModel::isAppCurrentlyVisible(const NvApp& app)
|
||||||
{
|
{
|
||||||
for (const NvApp& visibleApp : m_VisibleApps) {
|
for (const NvApp& visibleApp : std::as_const(m_VisibleApps)) {
|
||||||
if (app.id == visibleApp.id) {
|
if (app.id == visibleApp.id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -156,7 +156,7 @@ void AppModel::updateAppList(QVector<NvApp> newList)
|
||||||
const NvApp& existingApp = m_VisibleApps.at(i);
|
const NvApp& existingApp = m_VisibleApps.at(i);
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (const NvApp& newApp : newVisibleList) {
|
for (const NvApp& newApp : std::as_const(newVisibleList)) {
|
||||||
if (existingApp.id == newApp.id) {
|
if (existingApp.id == newApp.id) {
|
||||||
// If the data changed, update it in our list
|
// If the data changed, update it in our list
|
||||||
if (existingApp != newApp) {
|
if (existingApp != newApp) {
|
||||||
|
|
@ -178,7 +178,7 @@ void AppModel::updateAppList(QVector<NvApp> newList)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process additions now
|
// Process additions now
|
||||||
for (const NvApp& newApp : newVisibleList) {
|
for (const NvApp& newApp : std::as_const(newVisibleList)) {
|
||||||
int insertionIndex = m_VisibleApps.size();
|
int insertionIndex = m_VisibleApps.size();
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ void SdlGamepadKeyNavigation::onPollingTimerFired()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle analog sticks by polling
|
// Handle analog sticks by polling
|
||||||
for (auto gc : m_Gamepads) {
|
for (auto gc : std::as_const(m_Gamepads)) {
|
||||||
short leftX = SDL_GameControllerGetAxis(gc, SDL_CONTROLLER_AXIS_LEFTX);
|
short leftX = SDL_GameControllerGetAxis(gc, SDL_CONTROLLER_AXIS_LEFTX);
|
||||||
short leftY = SDL_GameControllerGetAxis(gc, SDL_CONTROLLER_AXIS_LEFTY);
|
short leftY = SDL_GameControllerGetAxis(gc, SDL_CONTROLLER_AXIS_LEFTY);
|
||||||
if (SDL_GetTicks() - m_LastAxisNavigationEventTime < AXIS_NAVIGATION_REPEAT_DELAY) {
|
if (SDL_GetTicks() - m_LastAxisNavigationEventTime < AXIS_NAVIGATION_REPEAT_DELAY) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ MappingManager::MappingManager()
|
||||||
#else
|
#else
|
||||||
.split('\n', QString::SkipEmptyParts);
|
.split('\n', QString::SkipEmptyParts);
|
||||||
#endif
|
#endif
|
||||||
for (const QString& sdlMapping : sdlMappings) {
|
for (const QString& sdlMapping : std::as_const(sdlMappings)) {
|
||||||
SdlGamepadMapping mapping(sdlMapping);
|
SdlGamepadMapping mapping(sdlMapping);
|
||||||
addMapping(mapping);
|
addMapping(mapping);
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +99,7 @@ void MappingManager::applyMappings()
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<SdlGamepadMapping> mappings = m_Mappings.values();
|
QList<SdlGamepadMapping> mappings = m_Mappings.values();
|
||||||
for (const SdlGamepadMapping& mapping : mappings) {
|
for (const SdlGamepadMapping& mapping : std::as_const(mappings)) {
|
||||||
QString sdlMappingString = mapping.getSdlMappingString();
|
QString sdlMappingString = mapping.getSdlMappingString();
|
||||||
int ret = SDL_GameControllerAddMapping(qPrintable(sdlMappingString));
|
int ret = SDL_GameControllerAddMapping(qPrintable(sdlMappingString));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ void SdlInputHandler::raiseAllKeys()
|
||||||
"Raising %d keys",
|
"Raising %d keys",
|
||||||
(int)m_KeysDown.count());
|
(int)m_KeysDown.count());
|
||||||
|
|
||||||
for (auto keyDown : m_KeysDown) {
|
for (auto keyDown : std::as_const(m_KeysDown)) {
|
||||||
LiSendKeyboardEvent(keyDown, KEY_ACTION_UP, 0);
|
LiSendKeyboardEvent(keyDown, KEY_ACTION_UP, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1596,7 +1596,7 @@ bool Session::startConnectionAsync()
|
||||||
// the chosen resolution. Avoid that by disabling SOPS when it
|
// the chosen resolution. Avoid that by disabling SOPS when it
|
||||||
// is not streaming a supported resolution.
|
// is not streaming a supported resolution.
|
||||||
enableGameOptimizations = false;
|
enableGameOptimizations = false;
|
||||||
for (const NvDisplayMode &mode : m_Computer->displayModes) {
|
for (const NvDisplayMode &mode : std::as_const(m_Computer->displayModes)) {
|
||||||
if (mode.width == m_StreamConfig.width &&
|
if (mode.width == m_StreamConfig.width &&
|
||||||
mode.height == m_StreamConfig.height) {
|
mode.height == m_StreamConfig.height) {
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public:
|
||||||
{
|
{
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
for (const int & v : *this) {
|
for (const int v : *this) {
|
||||||
value |= v;
|
value |= v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ void Pacer::handleVsync(int timeUntilNextVsyncMillis)
|
||||||
// frame history to drop frames only if consistently above the
|
// frame history to drop frames only if consistently above the
|
||||||
// one queued frame mark.
|
// one queued frame mark.
|
||||||
if (m_MaxVideoFps >= m_DisplayFps) {
|
if (m_MaxVideoFps >= m_DisplayFps) {
|
||||||
for (int queueHistoryEntry : m_PacingQueueHistory) {
|
for (int queueHistoryEntry : std::as_const(m_PacingQueueHistory)) {
|
||||||
if (queueHistoryEntry <= 1) {
|
if (queueHistoryEntry <= 1) {
|
||||||
// Be lenient as long as the queue length
|
// Be lenient as long as the queue length
|
||||||
// resolves before the end of frame history
|
// resolves before the end of frame history
|
||||||
|
|
@ -360,7 +360,7 @@ void Pacer::renderFrame(AVFrame* frame)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameDropTarget = 0;
|
frameDropTarget = 0;
|
||||||
for (int queueHistoryEntry : m_RenderQueueHistory) {
|
for (int queueHistoryEntry : std::as_const(m_RenderQueueHistory)) {
|
||||||
if (queueHistoryEntry == 0) {
|
if (queueHistoryEntry == 0) {
|
||||||
// Be lenient as long as the queue length
|
// Be lenient as long as the queue length
|
||||||
// resolves before the end of frame history
|
// resolves before the end of frame history
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue