[gcc(refs/users/ppalka/heads/libstdcxx-constrained-algos)] Preincrement iterators instead of postincrementing where possible
Patrick Palka
ppalka@gcc.gnu.org
Thu Jan 23 16:25:00 GMT 2020
https://gcc.gnu.org/g:b3f799c0d450927bdf35798fcb70c4d735bb6bf2
commit b3f799c0d450927bdf35798fcb70c4d735bb6bf2
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Jan 22 21:55:27 2020 -0500
Preincrement iterators instead of postincrementing where possible
Diff:
---
libstdc++-v3/include/bits/ranges_algo.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/bits/ranges_algo.h b/libstdc++-v3/include/bits/ranges_algo.h
index bbfb2aa..1105ff1 100644
--- a/libstdc++-v3/include/bits/ranges_algo.h
+++ b/libstdc++-v3/include/bits/ranges_algo.h
@@ -857,8 +857,8 @@ namespace ranges
*__result = std::move(*__first);
else
*__result = *__first;
- __first++;
- __result++;
+ ++__first;
+ ++__result;
}
return {std::move(__first), std::move(__result)};
}
@@ -871,8 +871,8 @@ namespace ranges
*__result = std::move(*__first);
else
*__result = *__first;
- __first++;
- __result++;
+ ++__first;
+ ++__result;
}
return {std::move(__first), std::move(__result)};
}
More information about the Libstdc++-cvs
mailing list