forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-util/bdelta: tweak for gcc-6, bug #594246
c++11 intruduced next() helper http://en.cppreference.com/w/cpp/iterator/next which does exactly the same. Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/594246 Package-Manager: portage-2.3.0
- Loading branch information
Sergei Trofimovich
committed
Sep 18, 2016
1 parent
41389eb
commit eb4328c
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/src/libbdelta.cpp b/src/libbdelta.cpp | ||
index b11bb2b..d769b0d 100644 | ||
--- a/src/libbdelta.cpp | ||
+++ b/src/libbdelta.cpp | ||
@@ -117,7 +117,3 @@ unsigned match_backward(BDelta_Instance *b, unsigned p1, unsigned p2, unsigned b | ||
// Iterator helper function | ||
-template <class T> | ||
-inline T prior(T i) {return --i;} | ||
-template <class T> | ||
-inline T next(T i) {return ++i;} | ||
- | ||
+template <class T> inline T bdelta_next(T i) {return ++i;} | ||
|
||
@@ -423,3 +419,3 @@ void bdelta_pass(BDelta_Instance *b, unsigned blocksize, unsigned minMatchSize, | ||
if (! maxHoleSize || (u1.num <= maxHoleSize && u2.num <= maxHoleSize)) | ||
- if (! (flags & BDELTA_SIDES_ORDERED) || (next(u1.ml) == u1.mr && next(u2.ml) == u2.mr)) | ||
+ if (! (flags & BDELTA_SIDES_ORDERED) || (bdelta_next(u1.ml) == u1.mr && bdelta_next(u2.ml) == u2.mr)) | ||
bdelta_pass_2(b, blocksize, minMatchSize, &u1, 1, &u2, 1); |