diff options
author | Abseil Team <absl-team@google.com> | 2021-04-01 08:22:23 -0700 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2021-04-01 18:28:34 -0400 |
commit | 354030bec37f8d90092245e07323628da50c6996 (patch) | |
tree | 997a17809ec4c22eb2b33bfd716e309132027866 /absl/strings/internal | |
parent | 2faed9dd2a3722eda068ad88df3b4071f5c5588d (diff) |
Export of internal Abseil changes
--
c207f164477b5c7f0cb1c5c8bfdc1430b457da17 by Martijn Vels <mvels@google.com>:
Add a 'node()' property to CordRepRingReader.
PiperOrigin-RevId: 366254778
GitOrigin-RevId: c207f164477b5c7f0cb1c5c8bfdc1430b457da17
Change-Id: I90478d151c2ab5d2ceed6de9fb4946a6a4b48f32
Diffstat (limited to 'absl/strings/internal')
-rw-r--r-- | absl/strings/internal/cord_rep_ring_reader.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/strings/internal/cord_rep_ring_reader.h b/absl/strings/internal/cord_rep_ring_reader.h index 396c0e2c..7ceeaa00 100644 --- a/absl/strings/internal/cord_rep_ring_reader.h +++ b/absl/strings/internal/cord_rep_ring_reader.h @@ -40,6 +40,10 @@ class CordRepRingReader { // The returned value is undefined if this instance is empty. CordRepRing::index_type index() const { return index_; } + // Returns the current node inside the ring buffer for this instance. + // The returned value is undefined if this instance is empty. + CordRep* node() const { return ring_->entry_child(index_); } + // Returns the length of the referenced ring buffer. // Requires the current instance to be non empty. size_t length() const { |