Fixed CodeCL warnings
This commit is contained in:
@@ -121,8 +121,7 @@ namespace API::Subsonic
|
||||
}
|
||||
|
||||
// Report the first GENRE for this track
|
||||
ClusterType::pointer clusterType{ ClusterType::find(dbSession, "GENRE") };
|
||||
if (clusterType)
|
||||
if (ClusterType::pointer clusterType{ ClusterType::find(dbSession, "GENRE") })
|
||||
{
|
||||
auto clusters{ release->getClusterGroups({clusterType}, 1) };
|
||||
if (!clusters.empty() && !clusters.front().empty())
|
||||
|
||||
@@ -149,8 +149,7 @@ namespace API::Subsonic
|
||||
trackResponse.setAttribute("starred", StringUtils::toISO8601String(dateTime));
|
||||
|
||||
// Report the first GENRE for this track
|
||||
ClusterType::pointer genreClusterType{ ClusterType::find(dbSession, "GENRE") };
|
||||
if (genreClusterType)
|
||||
if (ClusterType::pointer genreClusterType{ ClusterType::find(dbSession, "GENRE") })
|
||||
{
|
||||
auto clusters{ track->getClusterGroups({genreClusterType}, 1) };
|
||||
if (!clusters.empty() && !clusters.front().empty())
|
||||
|
||||
Reference in New Issue
Block a user