summaryrefslogtreecommitdiff
path: root/absl/strings/internal/cord_rep_ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/internal/cord_rep_ring.h')
-rw-r--r--absl/strings/internal/cord_rep_ring.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/absl/strings/internal/cord_rep_ring.h b/absl/strings/internal/cord_rep_ring.h
index 55cba8b4..c74d3353 100644
--- a/absl/strings/internal/cord_rep_ring.h
+++ b/absl/strings/internal/cord_rep_ring.h
@@ -34,8 +34,10 @@ namespace cord_internal {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
+#if __has_warning("-Wshadow-field")
#pragma clang diagnostic ignored "-Wshadow-field"
#endif
+#endif
// All operations modifying a ring buffer are implemented as static methods
// requiring a CordRepRing instance with a reference adopted by the method.
@@ -81,7 +83,7 @@ class CordRepRing : public CordRep {
// `end_pos` which is the `end_pos` of the previous node (or `begin_pos`) plus
// this node's length. The purpose is to allow for a binary search on this
// position, while allowing O(1) prepend and append operations.
- using pos_type = uint64_t;
+ using pos_type = size_t;
// `index_type` is the type for the `head`, `tail` and `capacity` indexes.
// Ring buffers are limited to having no more than four billion entries.