summaryrefslogtreecommitdiff
path: root/absl/strings/cord.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/cord.h')
-rw-r--r--absl/strings/cord.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/absl/strings/cord.h b/absl/strings/cord.h
index a0db2797..b8b251b0 100644
--- a/absl/strings/cord.h
+++ b/absl/strings/cord.h
@@ -125,9 +125,9 @@ class Cord {
absl::enable_if_t<std::is_same<T, std::string>::value, int>;
public:
- // Cord::Cord() Constructors
+ // Cord::Cord() Constructors.
- // Creates an empty Cord
+ // Creates an empty Cord.
constexpr Cord() noexcept;
// Creates a Cord from an existing Cord. Cord is copyable and efficiently
@@ -153,7 +153,7 @@ class Cord {
// Cord::~Cord()
//
- // Destructs the Cord
+ // Destructs the Cord.
~Cord() {
if (contents_.is_tree()) DestroyCordSlow();
}
@@ -587,7 +587,7 @@ class Cord {
// Cord::operator[]
//
- // Get the "i"th character of the Cord and returns it, provided that
+ // Gets the "i"th character of the Cord and returns it, provided that
// 0 <= i < Cord.size().
//
// NOTE: This routine is reasonably efficient. It is roughly
@@ -599,8 +599,8 @@ class Cord {
// Cord::TryFlat()
//
- // If this cord's representation is a single flat array, return a
- // string_view referencing that array. Otherwise return nullopt.
+ // If this cord's representation is a single flat array, returns a
+ // string_view referencing that array. Otherwise returns nullopt.
absl::optional<absl::string_view> TryFlat() const;
// Cord::Flatten()
@@ -610,7 +610,7 @@ class Cord {
// If the cord was already flat, the contents are not modified.
absl::string_view Flatten();
- // Support absl::Cord as a sink object for absl::Format().
+ // Supports absl::Cord as a sink object for absl::Format().
friend void AbslFormatFlush(absl::Cord* cord, absl::string_view part) {
cord->Append(part);
}
@@ -629,7 +629,7 @@ class Cord {
friend bool operator==(const Cord& lhs, const Cord& rhs);
friend bool operator==(const Cord& lhs, absl::string_view rhs);
- // Call the provided function once for each cord chunk, in order. Unlike
+ // Calls the provided function once for each cord chunk, in order. Unlike
// Chunks(), this API will not allocate memory.
void ForEachChunk(absl::FunctionRef<void(absl::string_view)>) const;
@@ -673,7 +673,7 @@ class Cord {
void replace_tree(absl::cord_internal::CordRep* rep);
// Returns non-null iff was holding a pointer
absl::cord_internal::CordRep* clear();
- // Convert to pointer if necessary
+ // Converts to pointer if necessary.
absl::cord_internal::CordRep* force_tree(size_t extra_hint);
void reduce_size(size_t n); // REQUIRES: holding data
void remove_prefix(size_t n); // REQUIRES: holding data
@@ -731,14 +731,14 @@ class Cord {
};
InlineRep contents_;
- // Helper for MemoryUsage()
+ // Helper for MemoryUsage().
static size_t MemoryUsageAux(const absl::cord_internal::CordRep* rep);
- // Helper for GetFlat() and TryFlat()
+ // Helper for GetFlat() and TryFlat().
static bool GetFlatAux(absl::cord_internal::CordRep* rep,
absl::string_view* fragment);
- // Helper for ForEachChunk()
+ // Helper for ForEachChunk().
static void ForEachChunkAux(
absl::cord_internal::CordRep* rep,
absl::FunctionRef<void(absl::string_view)> callback);
@@ -767,11 +767,11 @@ class Cord {
absl::cord_internal::CordRep* TakeRep() const&;
absl::cord_internal::CordRep* TakeRep() &&;
- // Helper for Append()
+ // Helper for Append().
template <typename C>
void AppendImpl(C&& src);
- // Helper for AbslHashValue()
+ // Helper for AbslHashValue().
template <typename H>
H HashFragmented(H hash_state) const {
typename H::AbslInternalPiecewiseCombiner combiner;