Utils: Remove superfluous qualifications

Change-Id: I36e17dac0cff87f82f0ddaf97bc613389110f218
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Orgad Shaneh
2018-07-17 23:21:05 +03:00
committed by Tobias Hunger
parent 9f8dbc1d2f
commit 7cee991c70
26 changed files with 95 additions and 95 deletions

View File

@@ -727,15 +727,15 @@ auto toConstReferences(const SourceContainer &sources)
/////////////////
template<class C, typename P>
Q_REQUIRED_RESULT Utils::optional<typename C::value_type> take(C &container, P predicate)
Q_REQUIRED_RESULT optional<typename C::value_type> take(C &container, P predicate)
{
const auto end = std::end(container);
const auto it = std::find_if(std::begin(container), end, predicate);
if (it == end)
return Utils::nullopt;
return nullopt;
Utils::optional<typename C::value_type> result = Utils::make_optional(std::move(*it));
optional<typename C::value_type> result = Utils::make_optional(std::move(*it));
container.erase(it);
return result;
}