diff options
Diffstat (limited to 'absl')
42 files changed, 52 insertions, 52 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h index df2c458f..8e9fa77e 100644 --- a/absl/base/attributes.h +++ b/absl/base/attributes.h @@ -331,7 +331,7 @@ // This functionality is supported by GNU linker. #ifndef ABSL_ATTRIBUTE_SECTION_VARIABLE #ifdef _AIX -// __attribute__((section(#name))) on AIX is achived by using the `.csect` psudo +// __attribute__((section(#name))) on AIX is achieved by using the `.csect` psudo // op which includes an additional integer as part of its syntax indcating // alignment. If data fall under different alignments then you might get a // compilation error indicating a `Section type conflict`. diff --git a/absl/base/internal/exception_safety_testing.h b/absl/base/internal/exception_safety_testing.h index 77a5aec6..c1061544 100644 --- a/absl/base/internal/exception_safety_testing.h +++ b/absl/base/internal/exception_safety_testing.h @@ -946,7 +946,7 @@ class ExceptionSafetyTest { * `std::unique_ptr<T> operator()() const` where T is the type being tested. * It is used for reliably creating identical T instances to test on. * - * - Operation: The operation object (passsed in via tester.WithOperation(...) + * - Operation: The operation object (passed in via tester.WithOperation(...) * or tester.Test(...)) must be invocable with the signature * `void operator()(T*) const` where T is the type being tested. It is used * for performing steps on a T instance that may throw and that need to be diff --git a/absl/base/internal/thread_identity_test.cc b/absl/base/internal/thread_identity_test.cc index 46a6f743..5f17553e 100644 --- a/absl/base/internal/thread_identity_test.cc +++ b/absl/base/internal/thread_identity_test.cc @@ -95,7 +95,7 @@ TEST(ThreadIdentityTest, BasicIdentityWorksThreaded) { } TEST(ThreadIdentityTest, ReusedThreadIdentityMutexTest) { - // This test repeatly creates and joins a series of threads, each of + // This test repeatedly creates and joins a series of threads, each of // which acquires and releases shared Mutex locks. This verifies // Mutex operations work correctly under a reused // ThreadIdentity. Note that the most likely failure mode of this diff --git a/absl/container/inlined_vector.h b/absl/container/inlined_vector.h index 9c3289a7..3e807fdd 100644 --- a/absl/container/inlined_vector.h +++ b/absl/container/inlined_vector.h @@ -745,7 +745,7 @@ class InlinedVector { // Erases the element at `pos`, returning an `iterator` pointing to where the // erased element was located. // - // NOTE: may return `end()`, which is not dereferencable. + // NOTE: may return `end()`, which is not dereferenceable. iterator erase(const_iterator pos) { ABSL_HARDENING_ASSERT(pos >= begin()); ABSL_HARDENING_ASSERT(pos < end()); @@ -757,7 +757,7 @@ class InlinedVector { // range [`from`, `to`), returning an `iterator` pointing to where the first // erased element was located. // - // NOTE: may return `end()`, which is not dereferencable. + // NOTE: may return `end()`, which is not dereferenceable. iterator erase(const_iterator from, const_iterator to) { ABSL_HARDENING_ASSERT(from >= begin()); ABSL_HARDENING_ASSERT(from <= to); diff --git a/absl/container/inlined_vector_benchmark.cc b/absl/container/inlined_vector_benchmark.cc index 56a6bfd2..5a04277c 100644 --- a/absl/container/inlined_vector_benchmark.cc +++ b/absl/container/inlined_vector_benchmark.cc @@ -66,7 +66,7 @@ void BM_StdVectorFill(benchmark::State& state) { BENCHMARK(BM_StdVectorFill)->Range(1, 256); // The purpose of the next two benchmarks is to verify that -// absl::InlinedVector is efficient when moving is more efficent than +// absl::InlinedVector is efficient when moving is more efficient than // copying. To do so, we use strings that are larger than the short // string optimization. bool StringRepresentedInline(std::string s) { diff --git a/absl/container/internal/common_policy_traits.h b/absl/container/internal/common_policy_traits.h index b42c9a48..3558a543 100644 --- a/absl/container/internal/common_policy_traits.h +++ b/absl/container/internal/common_policy_traits.h @@ -87,7 +87,7 @@ struct common_policy_traits { } private: - // To rank the overloads below for overload resoltion. Rank0 is preferred. + // To rank the overloads below for overload resolution. Rank0 is preferred. struct Rank2 {}; struct Rank1 : Rank2 {}; struct Rank0 : Rank1 {}; diff --git a/absl/container/internal/container_memory.h b/absl/container/internal/container_memory.h index bfa4ff93..f59ca4ee 100644 --- a/absl/container/internal/container_memory.h +++ b/absl/container/internal/container_memory.h @@ -165,7 +165,7 @@ decltype(std::declval<F>()(std::declval<T>())) WithConstructed( std::forward<F>(f)); } -// Given arguments of an std::pair's consructor, PairArgs() returns a pair of +// Given arguments of an std::pair's constructor, PairArgs() returns a pair of // tuples with references to the passed arguments. The tuples contain // constructor arguments for the first and the second elements of the pair. // diff --git a/absl/container/internal/inlined_vector.h b/absl/container/internal/inlined_vector.h index 451fb191..f886dfa0 100644 --- a/absl/container/internal/inlined_vector.h +++ b/absl/container/internal/inlined_vector.h @@ -1050,7 +1050,7 @@ template <typename NotMemcpyPolicy> void Storage<T, N, A>::SwapInlinedElements(NotMemcpyPolicy policy, Storage* other) { // Note: `destroy` needs to use pre-swap allocator while `construct` - - // post-swap allocator. Allocators will be swaped later on outside of + // post-swap allocator. Allocators will be swapped later on outside of // `SwapInlinedElements`. Storage* small_ptr = this; Storage* large_ptr = other; diff --git a/absl/container/internal/layout_benchmark.cc b/absl/container/internal/layout_benchmark.cc index d8636e8d..3af35e33 100644 --- a/absl/container/internal/layout_benchmark.cc +++ b/absl/container/internal/layout_benchmark.cc @@ -85,7 +85,7 @@ void BM_OffsetVariable(benchmark::State& state) { size_t m = 5; size_t k = 7; ABSL_RAW_CHECK(L::Partial(n, m, k).template Offset<3>() == Offset, - "Inavlid offset"); + "Invalid offset"); for (auto _ : state) { DoNotOptimize(n); DoNotOptimize(m); diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index f487e4d5..ada3f900 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -115,7 +115,7 @@ // starting with that index and extract potential candidates: occupied slots // with a control byte equal to `H2(hash(x))`. If we find an empty slot in the // group, we stop and return an error. Each candidate slot `y` is compared with -// `x`; if `x == y`, we are done and return `&y`; otherwise we contine to the +// `x`; if `x == y`, we are done and return `&y`; otherwise we continue to the // next probe index. Tombstones effectively behave like full slots that never // match the value we're looking for. // @@ -2456,7 +2456,7 @@ class raw_hash_set { void rehash_and_grow_if_necessary() { const size_t cap = capacity(); if (cap > Group::kWidth && - // Do these calcuations in 64-bit to avoid overflow. + // Do these calculations in 64-bit to avoid overflow. size() * uint64_t{32} <= cap* uint64_t{25}) { // Squash DELETED without growing if there is enough capacity. // diff --git a/absl/container/node_hash_set.h b/absl/container/node_hash_set.h index f2cc70c3..905a93d8 100644 --- a/absl/container/node_hash_set.h +++ b/absl/container/node_hash_set.h @@ -334,7 +334,7 @@ class node_hash_set // for the past-the-end iterator, which is invalidated. // // `swap()` requires that the node hash set's hashing and key equivalence - // functions be Swappable, and are exchaged using unqualified calls to + // functions be Swappable, and are exchanged using unqualified calls to // non-member `swap()`. If the set's allocator has // `std::allocator_traits<allocator_type>::propagate_on_container_swap::value` // set to `true`, the allocators are also exchanged using an unqualified call diff --git a/absl/crc/internal/crc.cc b/absl/crc/internal/crc.cc index 87202165..ba4c6d13 100644 --- a/absl/crc/internal/crc.cc +++ b/absl/crc/internal/crc.cc @@ -438,7 +438,7 @@ CRC* CRC::Crc32c() { // This Concat implementation works for arbitrary polynomials. void CRC::Concat(uint32_t* px, uint32_t y, size_t ylen) { // https://en.wikipedia.org/wiki/Mathematics_of_cyclic_redundancy_checks - // The CRC of a message M is the remainder of polynomial divison modulo G, + // The CRC of a message M is the remainder of polynomial division modulo G, // where the coefficient arithmetic is performed modulo 2 (so +/- are XOR): // R(x) = M(x) x**n (mod G) // (n is the degree of G) diff --git a/absl/crc/internal/crc.h b/absl/crc/internal/crc.h index 72515b06..08afba3c 100644 --- a/absl/crc/internal/crc.h +++ b/absl/crc/internal/crc.h @@ -53,7 +53,7 @@ class CRC { // points to an array of "length" zero bytes. virtual void ExtendByZeroes(uint32_t* crc, size_t length) const = 0; - // Inverse opration of ExtendByZeroes. If `crc` is the CRC value of a string + // Inverse operation of ExtendByZeroes. If `crc` is the CRC value of a string // ending in `length` zero bytes, this returns a CRC value of that string // with those zero bytes removed. virtual void UnextendByZeroes(uint32_t* crc, size_t length) const = 0; diff --git a/absl/crc/internal/crc_cord_state.h b/absl/crc/internal/crc_cord_state.h index d305424c..bc62d555 100644 --- a/absl/crc/internal/crc_cord_state.h +++ b/absl/crc/internal/crc_cord_state.h @@ -71,7 +71,7 @@ class CrcCordState { struct Rep { // `removed_prefix` is the crc and length of any prefix that has been // removed from the Cord (for example, by calling - // `CrcCord::RemovePrefix()`). To get the checkum of any prefix of the cord, + // `CrcCord::RemovePrefix()`). To get the checksum of any prefix of the cord, // this value must be subtracted from `prefix_crc`. See `Checksum()` for an // example. // diff --git a/absl/crc/internal/crc_internal.h b/absl/crc/internal/crc_internal.h index 3a047880..97083423 100644 --- a/absl/crc/internal/crc_internal.h +++ b/absl/crc/internal/crc_internal.h @@ -111,7 +111,7 @@ class CRC32 : public CRCImpl { // Common implementation guts for ExtendByZeroes and UnextendByZeroes(). // // zeroes_table is a table as returned by FillZeroesTable(), containing - // polynomials representing CRCs of strings-of-zeros of various lenghts, + // polynomials representing CRCs of strings-of-zeros of various lengths, // and which can be combined by polynomial multiplication. poly_table is // a table of CRC byte extension values. These tables are determined by // the generator polynomial. diff --git a/absl/debugging/internal/stacktrace_x86-inl.inc b/absl/debugging/internal/stacktrace_x86-inl.inc index 7b26464e..1975ba74 100644 --- a/absl/debugging/internal/stacktrace_x86-inl.inc +++ b/absl/debugging/internal/stacktrace_x86-inl.inc @@ -40,7 +40,7 @@ using absl::debugging_internal::AddressIsReadable; #if defined(__linux__) && defined(__i386__) // Count "push %reg" instructions in VDSO __kernel_vsyscall(), -// preceeding "syscall" or "sysenter". +// preceding "syscall" or "sysenter". // If __kernel_vsyscall uses frame pointer, answer 0. // // kMaxBytes tells how many instruction bytes of __kernel_vsyscall diff --git a/absl/flags/internal/flag.h b/absl/flags/internal/flag.h index ce891da1..d7edb8c6 100644 --- a/absl/flags/internal/flag.h +++ b/absl/flags/internal/flag.h @@ -121,7 +121,7 @@ inline void* Clone(FlagOpFn op, const void* obj) { flags_internal::CopyConstruct(op, obj, res); return res; } -// Returns true if parsing of input text is successfull. +// Returns true if parsing of input text is successful. inline bool Parse(FlagOpFn op, absl::string_view text, void* dst, std::string* error) { return op(FlagOp::kParse, &text, dst, error) != nullptr; @@ -139,12 +139,12 @@ inline size_t Sizeof(FlagOpFn op) { return static_cast<size_t>(reinterpret_cast<intptr_t>( op(FlagOp::kSizeof, nullptr, nullptr, nullptr))); } -// Returns fast type id coresponding to the value type. +// Returns fast type id corresponding to the value type. inline FlagFastTypeId FastTypeId(FlagOpFn op) { return reinterpret_cast<FlagFastTypeId>( op(FlagOp::kFastTypeId, nullptr, nullptr, nullptr)); } -// Returns fast type id coresponding to the value type. +// Returns fast type id corresponding to the value type. inline const std::type_info* RuntimeTypeId(FlagOpFn op) { return reinterpret_cast<const std::type_info*>( op(FlagOp::kRuntimeTypeId, nullptr, nullptr, nullptr)); diff --git a/absl/functional/function_ref.h b/absl/functional/function_ref.h index f9779607..2b9139d3 100644 --- a/absl/functional/function_ref.h +++ b/absl/functional/function_ref.h @@ -66,11 +66,11 @@ class FunctionRef; // FunctionRef // -// An `absl::FunctionRef` is a lightweight wrapper to any invokable object with +// An `absl::FunctionRef` is a lightweight wrapper to any invocable object with // a compatible signature. Generally, an `absl::FunctionRef` should only be used // as an argument type and should be preferred as an argument over a const // reference to a `std::function`. `absl::FunctionRef` itself does not allocate, -// although the wrapped invokable may. +// although the wrapped invocable may. // // Example: // @@ -98,7 +98,7 @@ class FunctionRef<R(Args...)> { std::is_convertible<FR, R>::value>::type; public: - // Constructs a FunctionRef from any invokable type. + // Constructs a FunctionRef from any invocable type. template <typename F, typename = EnableIfCompatible<const F&>> // NOLINTNEXTLINE(runtime/explicit) FunctionRef(const F& f ABSL_ATTRIBUTE_LIFETIME_BOUND) diff --git a/absl/functional/internal/any_invocable.h b/absl/functional/internal/any_invocable.h index 49a46c14..b6a38e37 100644 --- a/absl/functional/internal/any_invocable.h +++ b/absl/functional/internal/any_invocable.h @@ -488,7 +488,7 @@ class CoreImpl { // object. Clear(); - // Perform the actual move/destory operation on the target function. + // Perform the actual move/destroy operation on the target function. other.manager_(FunctionToCall::relocate_from_to, &other.state_, &state_); manager_ = other.manager_; invoker_ = other.invoker_; diff --git a/absl/hash/hash.h b/absl/hash/hash.h index abf88830..470cca48 100644 --- a/absl/hash/hash.h +++ b/absl/hash/hash.h @@ -42,7 +42,7 @@ // // `absl::Hash` may also produce different values from different dynamically // loaded libraries. For this reason, `absl::Hash` values must never cross -// boundries in dynamically loaded libraries (including when used in types like +// boundaries in dynamically loaded libraries (including when used in types like // hash containers.) // // `absl::Hash` is intended to strongly mix input bits with a target of passing diff --git a/absl/log/internal/log_format.cc b/absl/log/internal/log_format.cc index b8cd5ac4..0dcbc795 100644 --- a/absl/log/internal/log_format.cc +++ b/absl/log/internal/log_format.cc @@ -49,7 +49,7 @@ namespace { // This templated function avoids compiler warnings about tautological // comparisons when log_internal::Tid is unsigned. It can be replaced with a -// constexpr if once the minimum C++ version Abseil suppports is C++17. +// constexpr if once the minimum C++ version Abseil supports is C++17. template <typename T> inline std::enable_if_t<!std::is_signed<T>::value> PutLeadingWhitespace(T tid, char*& p) { diff --git a/absl/log/internal/test_helpers.cc b/absl/log/internal/test_helpers.cc index 0de5b96b..bfcc9679 100644 --- a/absl/log/internal/test_helpers.cc +++ b/absl/log/internal/test_helpers.cc @@ -68,7 +68,7 @@ bool DiedOfQFatal(int exit_status) { #endif // ----------------------------------------------------------------------------- -// Helper for Log inititalization in test +// Helper for Log initialization in test // ----------------------------------------------------------------------------- void LogTestEnvironment::SetUp() { diff --git a/absl/log/internal/test_helpers.h b/absl/log/internal/test_helpers.h index fd06e295..714bc7bd 100644 --- a/absl/log/internal/test_helpers.h +++ b/absl/log/internal/test_helpers.h @@ -54,7 +54,7 @@ bool DiedOfQFatal(int exit_status); #endif // ----------------------------------------------------------------------------- -// Helper for Log inititalization in test +// Helper for Log initialization in test // ----------------------------------------------------------------------------- class LogTestEnvironment : public ::testing::Environment { diff --git a/absl/random/generators_test.cc b/absl/random/generators_test.cc index 14fd24e9..c3675674 100644 --- a/absl/random/generators_test.cc +++ b/absl/random/generators_test.cc @@ -49,7 +49,7 @@ void TestUniform(URBG* gen) { // (a, b) semantics, inferred types. absl::Uniform(absl::IntervalOpenOpen, *gen, 0, 1.0); // Promoted to double - // Explict overriding of types. + // Explicit overriding of types. absl::Uniform<int>(*gen, 0, 100); absl::Uniform<int8_t>(*gen, 0, 100); absl::Uniform<int16_t>(*gen, 0, 100); diff --git a/absl/random/internal/distribution_test_util.cc b/absl/random/internal/distribution_test_util.cc index e9005658..f2657046 100644 --- a/absl/random/internal/distribution_test_util.cc +++ b/absl/random/internal/distribution_test_util.cc @@ -213,7 +213,7 @@ double BetaIncompleteImpl(const double x, const double p, const double q, double result = 1.; int ns = static_cast<int>(q + xc * psq); - // Use the soper reduction forumla. + // Use the soper reduction formula. double rx = (ns == 0) ? x : x / xc; double temp = q - ai; for (;;) { @@ -247,7 +247,7 @@ double BetaIncompleteImpl(const double x, const double p, const double q, // https://www.jstor.org/stable/2346798?read-now=1&seq=4#page_scan_tab_contents // https://www.jstor.org/stable/2346887?seq=1#page_scan_tab_contents // -// XINBTA(p, q, beta, alhpa) +// XINBTA(p, q, beta, alpha) // p: the value of the parameter p. // q: the value of the parameter q. // beta: the value of ln B(p, q) diff --git a/absl/random/internal/randen_engine.h b/absl/random/internal/randen_engine.h index b4708664..fe2d9f6c 100644 --- a/absl/random/internal/randen_engine.h +++ b/absl/random/internal/randen_engine.h @@ -142,7 +142,7 @@ class alignas(8) randen_engine { // The Randen paper suggests preferentially initializing even-numbered // 128-bit vectors of the randen state (there are 16 such vectors). // The seed data is merged into the state offset by 128-bits, which - // implies prefering seed bytes [16..31, ..., 208..223]. Since the + // implies preferring seed bytes [16..31, ..., 208..223]. Since the // buffer is 32-bit values, we swap the corresponding buffer positions in // 128-bit chunks. size_t dst = kBufferSize; diff --git a/absl/strings/charconv.cc b/absl/strings/charconv.cc index 69d420bc..9f4e6d7c 100644 --- a/absl/strings/charconv.cc +++ b/absl/strings/charconv.cc @@ -203,7 +203,7 @@ struct FloatTraits<float> { if (mantissa > kMantissaMask) { // Normal value. // Adjust by 127 for the exponent representation bias, and an additional - // 23 due to the implied decimal point in the IEEE mantissa represenation. + // 23 due to the implied decimal point in the IEEE mantissa representation. flt += static_cast<uint32_t>(exponent + 127 + kTargetMantissaBits - 1) << 23; mantissa &= kMantissaMask; @@ -462,7 +462,7 @@ uint64_t ShiftRightAndRound(uint128 value, int shift, bool input_exact, // the low bit of `value` is set. // // In inexact mode, the nonzero error means the actual value is greater - // than the halfway point and we must alway round up. + // than the halfway point and we must always round up. if ((value & 1) == 1 || !input_exact) { ++value; } diff --git a/absl/strings/charconv.h b/absl/strings/charconv.h index 7c509812..111c7120 100644 --- a/absl/strings/charconv.h +++ b/absl/strings/charconv.h @@ -22,7 +22,7 @@ namespace absl { ABSL_NAMESPACE_BEGIN -// Workalike compatibilty version of std::chars_format from C++17. +// Workalike compatibility version of std::chars_format from C++17. // // This is an bitfield enumerator which can be passed to absl::from_chars to // configure the string-to-float conversion. @@ -48,7 +48,7 @@ struct from_chars_result { std::errc ec; }; -// Workalike compatibilty version of std::from_chars from C++17. Currently +// Workalike compatibility version of std::from_chars from C++17. Currently // this only supports the `double` and `float` types. // // This interface incorporates the proposed resolutions for library issues diff --git a/absl/strings/cord.cc b/absl/strings/cord.cc index 267163c8..14976aef 100644 --- a/absl/strings/cord.cc +++ b/absl/strings/cord.cc @@ -794,7 +794,7 @@ int CompareChunks(absl::string_view* lhs, absl::string_view* rhs, } // This overload set computes comparison results from memcmp result. This -// interface is used inside GenericCompare below. Differet implementations +// interface is used inside GenericCompare below. Different implementations // are specialized for int and bool. For int we clamp result to {-1, 0, 1} // set. For bool we just interested in "value == 0". template <typename ResultType> diff --git a/absl/strings/cord.h b/absl/strings/cord.h index c4a0d5aa..f5a2da97 100644 --- a/absl/strings/cord.h +++ b/absl/strings/cord.h @@ -661,7 +661,7 @@ class Cord { class CharRange { public: // Fulfill minimum c++ container requirements [container.requirements] - // Theses (partial) container type definitions allow CharRange to be used + // These (partial) container type definitions allow CharRange to be used // in various utilities expecting a subset of [container.requirements]. // For example, the below enables using `::testing::ElementsAre(...)` using value_type = char; diff --git a/absl/strings/cord_test_helpers.h b/absl/strings/cord_test_helpers.h index 31a1dc89..ca52240a 100644 --- a/absl/strings/cord_test_helpers.h +++ b/absl/strings/cord_test_helpers.h @@ -51,7 +51,7 @@ enum class TestCordSize { // existing inputs rather than copying contents of the input. kMedium = cord_internal::kMaxFlatLength / 2 + 1, - // A string value large enough to cause it to be stored in mutliple flats. + // A string value large enough to cause it to be stored in multiple flats. kLarge = cord_internal::kMaxFlatLength * 4 }; diff --git a/absl/strings/internal/charconv_bigint.h b/absl/strings/internal/charconv_bigint.h index d8992386..5c0c375d 100644 --- a/absl/strings/internal/charconv_bigint.h +++ b/absl/strings/internal/charconv_bigint.h @@ -92,7 +92,7 @@ class BigUnsigned { // numbers with this many decimal digits or fewer are representable by this // type. // - // Analagous to std::numeric_limits<BigUnsigned>::digits10. + // Analogous to std::numeric_limits<BigUnsigned>::digits10. static constexpr int Digits10() { // 9975007/1035508 is very slightly less than log10(2**32). return static_cast<uint64_t>(max_words) * 9975007 / 1035508; diff --git a/absl/strings/internal/cord_rep_btree_test.cc b/absl/strings/internal/cord_rep_btree_test.cc index 9d6ce484..82aeca37 100644 --- a/absl/strings/internal/cord_rep_btree_test.cc +++ b/absl/strings/internal/cord_rep_btree_test.cc @@ -507,7 +507,7 @@ TEST_P(CordRepBtreeTest, AppendToTreeTwoDeep) { for (size_t i = max_cap * max_cap + 1; i < max_cap * max_cap * max_cap; ++i) { // Ref top level tree based on param. // Ref child node once every 16 iterations, and leaf node every 4 - // iterrations which which should not have an observable effect other than + // iterations which which should not have an observable effect other than // the node and/or the leaf below it being copied. refs.RefIf(shared(), tree); refs.RefIf(i % 16 == 0, tree->Edges().back()); @@ -568,7 +568,7 @@ TEST_P(CordRepBtreeTest, PrependToTreeTwoDeep) { for (size_t i = max_cap * max_cap + 1; i < max_cap * max_cap * max_cap; ++i) { // Ref top level tree based on param. // Ref child node once every 16 iterations, and leaf node every 4 - // iterrations which which should not have an observable effect other than + // iterations which which should not have an observable effect other than // the node and/or the leaf below it being copied. refs.RefIf(shared(), tree); refs.RefIf(i % 16 == 0, tree->Edges().back()); diff --git a/absl/strings/internal/cord_rep_ring.h b/absl/strings/internal/cord_rep_ring.h index 2000e21e..a9cf8f3f 100644 --- a/absl/strings/internal/cord_rep_ring.h +++ b/absl/strings/internal/cord_rep_ring.h @@ -472,7 +472,7 @@ class CordRepRing : public CordRep { // Increases the data offset for entry `index` by `n`. void AddDataOffset(index_type index, size_t n); - // Descreases the length for entry `index` by `n`. + // Decreases the length for entry `index` by `n`. void SubLength(index_type index, size_t n); index_type head_; diff --git a/absl/strings/internal/cordz_functions_test.cc b/absl/strings/internal/cordz_functions_test.cc index 350623c1..b70a685e 100644 --- a/absl/strings/internal/cordz_functions_test.cc +++ b/absl/strings/internal/cordz_functions_test.cc @@ -38,7 +38,7 @@ TEST(CordzFunctionsTest, SampleRate) { } // Cordz is disabled when we don't have thread_local. All calls to -// should_profile will return false when cordz is diabled, so we might want to +// should_profile will return false when cordz is disabled, so we might want to // avoid those tests. #ifdef ABSL_INTERNAL_CORDZ_ENABLED diff --git a/absl/strings/internal/cordz_info.cc b/absl/strings/internal/cordz_info.cc index 0bea9c46..515dfafb 100644 --- a/absl/strings/internal/cordz_info.cc +++ b/absl/strings/internal/cordz_info.cc @@ -54,7 +54,7 @@ namespace { // The top level node is treated specially: we assume the current thread // (typically called from the CordzHandler) to hold a reference purely to // perform a safe analysis, and not being part of the application. So we -// substract 1 from the reference count of the top node to compute the +// subtract 1 from the reference count of the top node to compute the // 'application fair share' excluding the reference of the current thread. // // An example of fair sharing, and why we multiply reference counts: diff --git a/absl/strings/internal/cordz_sample_token.h b/absl/strings/internal/cordz_sample_token.h index b58022c3..96163c93 100644 --- a/absl/strings/internal/cordz_sample_token.h +++ b/absl/strings/internal/cordz_sample_token.h @@ -33,7 +33,7 @@ namespace cord_internal { // ST1 <- CH1 <- CH2 <- ST2 <- CH3 <- global_delete_queue_tail // // This list tracks that CH1 and CH2 were created after ST1, so the thread -// holding ST1 might have a referece to CH1, CH2, ST2, and CH3. However, ST2 was +// holding ST1 might have a reference to CH1, CH2, ST2, and CH3. However, ST2 was // created later, so the thread holding the ST2 token cannot have a reference to // ST1, CH1, or CH2. If ST1 is cleaned up first, that thread will delete ST1, // CH1, and CH2. If instead ST2 is cleaned up first, that thread will only diff --git a/absl/strings/internal/damerau_levenshtein_distance_test.cc b/absl/strings/internal/damerau_levenshtein_distance_test.cc index a342b7db..49dd105b 100644 --- a/absl/strings/internal/damerau_levenshtein_distance_test.cc +++ b/absl/strings/internal/damerau_levenshtein_distance_test.cc @@ -54,7 +54,7 @@ TEST(Distance, TestDistances) { } TEST(Distance, TestCutoff) { - // Returing cutoff + 1 if the value is larger than cutoff or string longer + // Returning cutoff + 1 if the value is larger than cutoff or string longer // than MAX_SIZE. EXPECT_THAT(CappedDamerauLevenshteinDistance("abcd", "a", 3), uint8_t{3}); EXPECT_THAT(CappedDamerauLevenshteinDistance("abcd", "a", 2), uint8_t{3}); diff --git a/absl/strings/internal/str_format/float_conversion.cc b/absl/strings/internal/str_format/float_conversion.cc index f1490e5a..44b11390 100644 --- a/absl/strings/internal/str_format/float_conversion.cc +++ b/absl/strings/internal/str_format/float_conversion.cc @@ -711,7 +711,7 @@ bool IncrementNibble(size_t nibble_index, Int* n) { constexpr size_t kShift = sizeof(Int) * 8 - 1; constexpr size_t kNumNibbles = sizeof(Int) * 8 / 4; Int before = *n >> kShift; - // Here we essentially want to take the number 1 and move it into the requsted + // Here we essentially want to take the number 1 and move it into the requested // nibble, then add it to *n to effectively increment the nibble. However, // ASan will complain if we try to shift the 1 beyond the limits of the Int, // i.e., if the nibble_index is out of range. So therefore we check for this diff --git a/absl/strings/numbers.cc b/absl/strings/numbers.cc index 2987158e..c2b861ae 100644 --- a/absl/strings/numbers.cc +++ b/absl/strings/numbers.cc @@ -219,7 +219,7 @@ char* numbers_internal::FastIntToBuffer(int32_t i, char* buffer) { if (i < 0) { *buffer++ = '-'; // We need to do the negation in modular (i.e., "unsigned") - // arithmetic; MSVC++ apprently warns for plain "-u", so + // arithmetic; MSVC++ apparently warns for plain "-u", so // we write the equivalent expression "0 - u" instead. u = 0 - u; } diff --git a/absl/time/internal/cctz/src/time_zone_posix.h b/absl/time/internal/cctz/src/time_zone_posix.h index 0cf29055..7fd2b9ec 100644 --- a/absl/time/internal/cctz/src/time_zone_posix.h +++ b/absl/time/internal/cctz/src/time_zone_posix.h @@ -104,7 +104,7 @@ struct PosixTransition { // The entirety of a POSIX-string specified time-zone rule. The standard // abbreviation and offset are always given. If the time zone includes -// daylight saving, then the daylight abbrevation is non-empty and the +// daylight saving, then the daylight abbreviation is non-empty and the // remaining fields are also valid. Note that the start/end transitions // are not ordered---in the southern hemisphere the transition to end // daylight time occurs first in any particular year. diff --git a/absl/types/internal/span.h b/absl/types/internal/span.h index a196362a..ab89ba3c 100644 --- a/absl/types/internal/span.h +++ b/absl/types/internal/span.h @@ -125,7 +125,7 @@ struct IsView< }; // These enablers result in 'int' so they can be used as typenames or defaults -// in template paramters lists. +// in template parameters lists. template <typename T> using EnableIfIsView = std::enable_if_t<IsView<T>::value, int>; |