Skip to content

Commit

Permalink
Fix some spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertexwahn committed Apr 24, 2023
1 parent 4ffaea7 commit 421a74d
Show file tree
Hide file tree
Showing 45 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion CMake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ And finally install:
cmake --build /temporary/build/abseil-cpp --target install
```

# CMake Option Synposis
# CMake Option Synopsis

## Enable Standard CMake Installation

Expand Down
2 changes: 1 addition & 1 deletion UPGRADES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# C++ Upgrade Tools

Abseil may occassionally release API-breaking changes. As noted in our
Abseil may occasionally release API-breaking changes. As noted in our
[Compatibility Guidelines][compatibility-guide], we will aim to provide a tool
to do the work of effecting such API-breaking changes, when absolutely
necessary.
Expand Down
2 changes: 1 addition & 1 deletion absl/base/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion absl/base/internal/exception_safety_testing.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion absl/base/internal/thread_identity_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions absl/container/inlined_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion absl/container/inlined_vector_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion absl/container/internal/common_policy_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down
2 changes: 1 addition & 1 deletion absl/container/internal/container_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion absl/container/internal/inlined_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion absl/container/internal/layout_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions absl/container/internal/raw_hash_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion absl/container/node_hash_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion absl/crc/internal/crc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion absl/crc/internal/crc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion absl/crc/internal/crc_cord_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion absl/crc/internal/crc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion absl/debugging/internal/stacktrace_x86-inl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions absl/flags/internal/flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down
6 changes: 3 additions & 3 deletions absl/functional/function_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion absl/functional/internal/any_invocable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
2 changes: 1 addition & 1 deletion absl/hash/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion absl/log/internal/log_format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion absl/log/internal/test_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion absl/log/internal/test_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion absl/random/generators_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions absl/random/internal/distribution_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 (;;) {
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion absl/random/internal/randen_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions absl/strings/charconv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions absl/strings/charconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion absl/strings/cord.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion absl/strings/cord.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion absl/strings/cord_test_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
2 changes: 1 addition & 1 deletion absl/strings/internal/charconv_bigint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions absl/strings/internal/cord_rep_btree_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down
Loading

0 comments on commit 421a74d

Please sign in to comment.