Some changes to please codeQL
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "ListenBrainzScrobbler.hpp"
|
#include "ListenBrainzScrobbler.hpp"
|
||||||
|
|
||||||
|
#include <tuple>
|
||||||
#include <boost/asio/bind_executor.hpp>
|
#include <boost/asio/bind_executor.hpp>
|
||||||
#include <Wt/Json/Array.h>
|
#include <Wt/Json/Array.h>
|
||||||
#include <Wt/Json/Object.h>
|
#include <Wt/Json/Object.h>
|
||||||
@@ -234,8 +235,7 @@ namespace Scrobbling::ListenBrainz
|
|||||||
auto itContext {_userContexts.find(userId)};
|
auto itContext {_userContexts.find(userId)};
|
||||||
if (itContext == std::cend(_userContexts))
|
if (itContext == std::cend(_userContexts))
|
||||||
{
|
{
|
||||||
[[maybe_unused]] auto [itNewContext, inserted] {_userContexts.emplace(userId, userId)};
|
std::tie(itContext, std::ignore) = _userContexts.emplace(userId, userId);
|
||||||
itContext = itNewContext;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return itContext->second;
|
return itContext->second;
|
||||||
@@ -246,8 +246,7 @@ namespace Scrobbling::ListenBrainz
|
|||||||
{
|
{
|
||||||
return std::any_of(std::cbegin(_userContexts), std::cend(_userContexts), [](const auto& contextEntry)
|
return std::any_of(std::cbegin(_userContexts), std::cend(_userContexts), [](const auto& contextEntry)
|
||||||
{
|
{
|
||||||
[[maybe_unused]] const auto& [userId, context] {contextEntry};
|
return contextEntry.second.syncing;
|
||||||
return context.syncing;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "ListenBrainzScrobbler.hpp"
|
#include "ListenBrainzScrobbler.hpp"
|
||||||
|
|
||||||
|
#include <tuple>
|
||||||
#include <boost/asio/bind_executor.hpp>
|
#include <boost/asio/bind_executor.hpp>
|
||||||
#include <Wt/Json/Array.h>
|
#include <Wt/Json/Array.h>
|
||||||
#include <Wt/Json/Object.h>
|
#include <Wt/Json/Object.h>
|
||||||
@@ -354,8 +355,7 @@ namespace Scrobbling::ListenBrainz
|
|||||||
auto itContext {_userContexts.find(userId)};
|
auto itContext {_userContexts.find(userId)};
|
||||||
if (itContext == std::cend(_userContexts))
|
if (itContext == std::cend(_userContexts))
|
||||||
{
|
{
|
||||||
[[maybe_unused]] auto [itNewContext, inserted] {_userContexts.emplace(userId, userId)};
|
std::tie(itContext, std::ignore) = _userContexts.emplace(userId, userId);
|
||||||
itContext = itNewContext;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return itContext->second;
|
return itContext->second;
|
||||||
@@ -366,8 +366,7 @@ namespace Scrobbling::ListenBrainz
|
|||||||
{
|
{
|
||||||
return std::any_of(std::cbegin(_userContexts), std::cend(_userContexts), [](const auto& contextEntry)
|
return std::any_of(std::cbegin(_userContexts), std::cend(_userContexts), [](const auto& contextEntry)
|
||||||
{
|
{
|
||||||
[[maybe_unused]] const auto& [userId, context] {contextEntry};
|
return contextEntry.second.syncing;
|
||||||
return context.syncing;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ showReleaseInfoModal(Database::ReleaseId releaseId)
|
|||||||
artistTable->addWidget(std::move(artistsEntry));
|
artistTable->addWidget(std::move(artistsEntry));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: save in DB and mean all this
|
// TODO: save in DB and mean all this
|
||||||
for (TrackId trackId : Track::find(LmsApp->getDbSession(), Track::FindParameters {}.setRelease(releaseId).setRange(Range {0, 1})).results)
|
for (TrackId trackId : Track::find(LmsApp->getDbSession(), Track::FindParameters {}.setRelease(releaseId).setRange(Range {0, 1})).results)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user