mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Fixed warnings reported by Clang on Windows.
This commit is contained in:
@@ -290,7 +290,7 @@ namespace BlackMisc
|
||||
int remove(const T &object)
|
||||
{
|
||||
const auto newEnd = std::remove(begin(), end(), object);
|
||||
int count = std::distance(newEnd, end());
|
||||
const auto count = std::distance(newEnd, end());
|
||||
erase(newEnd, end());
|
||||
return count;
|
||||
}
|
||||
@@ -300,8 +300,8 @@ namespace BlackMisc
|
||||
template <class Predicate>
|
||||
int removeIf(Predicate p)
|
||||
{
|
||||
auto newEnd = std::remove_if(begin(), end(), p);
|
||||
int count = std::distance(newEnd, end());
|
||||
const auto newEnd = std::remove_if(begin(), end(), p);
|
||||
const auto count = std::distance(newEnd, end());
|
||||
erase(newEnd, end());
|
||||
return count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user