projects
/
ceph.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9094c3a
)
bit-avoid-overloading
author
Ceph Packaging Team
<team+ceph@tracker.debian.org>
Tue, 7 Jan 2020 19:50:28 +0000
(19:50 +0000)
committer
Bernd Zeimetz
<bzed@debian.org>
Tue, 7 Jan 2020 19:50:28 +0000
(19:50 +0000)
Gbp-Pq: Name 32bit-avoid-overloading.patch
src/include/buffer.h
patch
|
blob
|
history
diff --git
a/src/include/buffer.h
b/src/include/buffer.h
index b8c78210eae0e81057f0396f91c1678ae4716b8a..e1d37729735d4472a3acf1c783142ce12e6d4417 100644
(file)
--- a/
src/include/buffer.h
+++ b/
src/include/buffer.h
@@
-737,7
+737,12
@@
inline namespace v14_2_0 {
void advance(int o) = delete;
void advance(unsigned o);
+
+// unsigned and size_t are equivalent on 32bit architectures.
+// so casting is only needed when not on 32bit.
+#if defined(UINTPTR_MAX) && UINTPTR_MAX > 0xffffffff
void advance(size_t o) { advance(static_cast<unsigned>(o)); }
+#endif
void seek(unsigned o);
char operator*() const;
iterator_impl& operator++();