projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7698252
)
Don't use std::advance just to increment or decrement by one.
author
Dan Gohman
<gohman@apple.com>
Mon, 7 Jul 2008 18:39:33 +0000
(18:39 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 7 Jul 2008 18:39:33 +0000
(18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53189
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/STLExtras.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/STLExtras.h
b/include/llvm/ADT/STLExtras.h
index f1883959d762c351250bfc6388ac772a409bfdf2..5c5e4aa9444f0a7edf4a30064116ad06c70c41db 100644
(file)
--- 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;
}
//===----------------------------------------------------------------------===//