summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-04-26 18:19:43 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-04-26 18:19:43 +0200
commit9064a832bf2f02e2fd26c62ee867dd779797235a (patch)
treea9f643a74f8d06c3194c429200ba0fbca3b17763
parent3824e0c49c7c43ac99d4f871d8404559070d7049 (diff)
Avoid -Wuseless-cast to int
Reported-By: gcc -Wuseless-cast Gbp-Dch: Ignore
-rw-r--r--apt-pkg/policy.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 034fce79c..761a6ede1 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -298,9 +298,9 @@ APT_PURE signed short pkgPolicy::GetPriority(pkgCache::VerIterator const &Ver, b
out bogus entries that may be due to config-file states, or
other. */
if (file.File().Flagged(pkgCache::Flag::NotSource) && Ver.ParentPkg().CurrentVer() != Ver)
- priority = std::max(priority, static_cast<decltype(priority)>(-1));
+ priority = std::max<decltype(priority)>(priority, -1);
else
- priority = std::max(priority, static_cast<decltype(priority)>(GetPriority(file.File())));
+ priority = std::max<decltype(priority)>(priority, GetPriority(file.File()));
}
return priority == std::numeric_limits<decltype(priority)>::min() ? 0 : priority;