aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/STLExtras.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index f188395..5c5e4aa 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -137,8 +137,7 @@ inline ItTy next(ItTy it, Dist n)
template <typename ItTy>
inline ItTy next(ItTy it)
{
- std::advance(it, 1);
- return it;
+ return ++it;
}
template <typename ItTy, typename Dist>
@@ -151,8 +150,7 @@ inline ItTy prior(ItTy it, Dist n)
template <typename ItTy>
inline ItTy prior(ItTy it)
{
- std::advance(it, -1);
- return it;
+ return --it;
}
//===----------------------------------------------------------------------===//