[Scummvm-git-logs] scummvm master -> b6c8d2add991d26a1309a83b5122285438fa1a3e
grisenti
noreply at scummvm.org
Thu Jun 1 21:22:39 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b6c8d2add9 HPL1: remove upper/lowerBound algorithms
Commit: b6c8d2add991d26a1309a83b5122285438fa1a3e
https://github.com/scummvm/scummvm/commit/b6c8d2add991d26a1309a83b5122285438fa1a3e
Author: grisenti (emanuele at grisenti.net)
Date: 2023-06-01T23:22:21+02:00
Commit Message:
HPL1: remove upper/lowerBound algorithms
Changed paths:
engines/hpl1/algorithms.h
diff --git a/engines/hpl1/algorithms.h b/engines/hpl1/algorithms.h
index 6d4e75b773c..a1834a1272f 100644
--- a/engines/hpl1/algorithms.h
+++ b/engines/hpl1/algorithms.h
@@ -34,30 +34,6 @@ void resizeAndFill(Common::Array<T> &container, const typename Common::Array<T>:
container[i] = value;
}
-template<typename RandomIt, typename V, typename Comp = Common::Less<V> >
-RandomIt lowerBound(RandomIt begin, RandomIt end, V const &val, Comp comp = {}) {
- while (begin < end) {
- const auto mid = begin + Common::distance(begin, end) / 2;
- if (comp(*mid, val))
- begin = mid + 1;
- else
- end = mid;
- }
- return begin;
-}
-
-template<typename RandomIt, typename V, typename Comp = Common::Less<V> >
-RandomIt upperBound(RandomIt begin, RandomIt end, V const &val, Comp comp = {}) {
- while (begin < end) {
- const auto mid = begin + Common::distance(begin, end) / 2;
- if (!comp(val, *mid))
- begin = mid + 1;
- else
- end = mid;
- }
- return begin;
-}
-
template<typename RandomIt, typename Pred>
RandomIt removeIf(RandomIt begin, RandomIt end, Pred pred) {
for (auto i = begin; i != end; ++i) {
More information about the Scummvm-git-logs
mailing list