Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abseil-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
abseil-cpp
Commits
421a74dc
Commit
421a74dc
authored
Apr 24, 2023
by
Vertexwahn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some spelling mistakes
parent
4ffaea74
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
56 additions
and
56 deletions
+56
-56
CMake/README.md
+1
-1
UPGRADES.md
+1
-1
absl/base/attributes.h
+1
-1
absl/base/internal/exception_safety_testing.h
+1
-1
absl/base/internal/thread_identity_test.cc
+1
-1
absl/container/inlined_vector.h
+2
-2
absl/container/inlined_vector_benchmark.cc
+1
-1
absl/container/internal/common_policy_traits.h
+1
-1
absl/container/internal/container_memory.h
+1
-1
absl/container/internal/inlined_vector.h
+1
-1
absl/container/internal/layout_benchmark.cc
+1
-1
absl/container/internal/raw_hash_set.h
+2
-2
absl/container/node_hash_set.h
+1
-1
absl/crc/internal/crc.cc
+1
-1
absl/crc/internal/crc.h
+1
-1
absl/crc/internal/crc_cord_state.h
+1
-1
absl/crc/internal/crc_internal.h
+1
-1
absl/debugging/internal/stacktrace_x86-inl.inc
+1
-1
absl/flags/internal/flag.h
+3
-3
absl/functional/function_ref.h
+3
-3
absl/functional/internal/any_invocable.h
+1
-1
absl/hash/hash.h
+1
-1
absl/log/internal/log_format.cc
+1
-1
absl/log/internal/test_helpers.cc
+1
-1
absl/log/internal/test_helpers.h
+1
-1
absl/random/generators_test.cc
+1
-1
absl/random/internal/distribution_test_util.cc
+2
-2
absl/random/internal/randen_engine.h
+1
-1
absl/strings/charconv.cc
+2
-2
absl/strings/charconv.h
+2
-2
absl/strings/cord.cc
+1
-1
absl/strings/cord.h
+1
-1
absl/strings/cord_test_helpers.h
+1
-1
absl/strings/internal/charconv_bigint.h
+1
-1
absl/strings/internal/cord_rep_btree_test.cc
+2
-2
absl/strings/internal/cord_rep_ring.h
+1
-1
absl/strings/internal/cordz_functions_test.cc
+1
-1
absl/strings/internal/cordz_info.cc
+1
-1
absl/strings/internal/cordz_sample_token.h
+1
-1
absl/strings/internal/damerau_levenshtein_distance_test.cc
+1
-1
absl/strings/internal/str_format/float_conversion.cc
+1
-1
absl/strings/numbers.cc
+1
-1
absl/time/internal/cctz/src/time_zone_posix.h
+1
-1
absl/types/internal/span.h
+1
-1
create_lts.py
+2
-2
No files found.
CMake/README.md
View file @
421a74dc
...
...
@@ -170,7 +170,7 @@ And finally install:
cmake --build /temporary/build/abseil-cpp --target install
```
# CMake Option Syn
po
sis
# CMake Option Syn
op
sis
## Enable Standard CMake Installation
...
...
UPGRADES.md
View file @
421a74dc
# C++ Upgrade Tools
Abseil may occas
s
ionally 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.
...
...
absl/base/attributes.h
View file @
421a74dc
...
...
@@ -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 achi
e
ved 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`.
...
...
absl/base/internal/exception_safety_testing.h
View file @
421a74dc
...
...
@@ -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 (pass
s
ed 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
...
...
absl/base/internal/thread_identity_test.cc
View file @
421a74dc
...
...
@@ -95,7 +95,7 @@ TEST(ThreadIdentityTest, BasicIdentityWorksThreaded) {
}
TEST
(
ThreadIdentityTest
,
ReusedThreadIdentityMutexTest
)
{
// This test repeatly creates and joins a series of threads, each of
// This test repeat
ed
ly 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
...
...
absl/container/inlined_vector.h
View file @
421a74dc
...
...
@@ -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 dereferenc
e
able.
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 dereferenc
e
able.
iterator
erase
(
const_iterator
from
,
const_iterator
to
)
{
ABSL_HARDENING_ASSERT
(
from
>=
begin
());
ABSL_HARDENING_ASSERT
(
from
<=
to
);
...
...
absl/container/inlined_vector_benchmark.cc
View file @
421a74dc
...
...
@@ -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 effic
i
ent than
// copying. To do so, we use strings that are larger than the short
// string optimization.
bool
StringRepresentedInline
(
std
::
string
s
)
{
...
...
absl/container/internal/common_policy_traits.h
View file @
421a74dc
...
...
@@ -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 resol
u
tion. Rank0 is preferred.
struct
Rank2
{};
struct
Rank1
:
Rank2
{};
struct
Rank0
:
Rank1
{};
...
...
absl/container/internal/container_memory.h
View file @
421a74dc
...
...
@@ -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 cons
t
ructor, 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.
//
...
...
absl/container/internal/inlined_vector.h
View file @
421a74dc
...
...
@@ -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 swap
p
ed later on outside of
// `SwapInlinedElements`.
Storage
*
small_ptr
=
this
;
Storage
*
large_ptr
=
other
;
...
...
absl/container/internal/layout_benchmark.cc
View file @
421a74dc
...
...
@@ -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
,
"In
av
lid offset"
);
"In
va
lid offset"
);
for
(
auto
_
:
state
)
{
DoNotOptimize
(
n
);
DoNotOptimize
(
m
);
...
...
absl/container/internal/raw_hash_set.h
View file @
421a74dc
...
...
@@ -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 contin
u
e 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 calcu
l
ations in 64-bit to avoid overflow.
size
()
*
uint64_t
{
32
}
<=
cap
*
uint64_t
{
25
})
{
// Squash DELETED without growing if there is enough capacity.
//
...
...
absl/container/node_hash_set.h
View file @
421a74dc
...
...
@@ -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 excha
n
ged 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
...
...
absl/crc/internal/crc.cc
View file @
421a74dc
...
...
@@ -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 divis
i
on 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)
...
...
absl/crc/internal/crc.h
View file @
421a74dc
...
...
@@ -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 op
e
ration 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
;
...
...
absl/crc/internal/crc_cord_state.h
View file @
421a74dc
...
...
@@ -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 check
s
um of any prefix of the cord,
// this value must be subtracted from `prefix_crc`. See `Checksum()` for an
// example.
//
...
...
absl/crc/internal/crc_internal.h
View file @
421a74dc
...
...
@@ -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 leng
ht
s,
// polynomials representing CRCs of strings-of-zeros of various leng
th
s,
// 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.
...
...
absl/debugging/internal/stacktrace_x86-inl.inc
View file @
421a74dc
...
...
@@ -40,7 +40,7 @@ using absl::debugging_internal::AddressIsReadable;
#if defined(__linux__) && defined(__i386__)
// Count "push %reg" instructions in VDSO __kernel_vsyscall(),
// prece
e
ding "syscall" or "sysenter".
// preceding "syscall" or "sysenter".
// If __kernel_vsyscall uses frame pointer, answer 0.
//
// kMaxBytes tells how many instruction bytes of __kernel_vsyscall
...
...
absl/flags/internal/flag.h
View file @
421a74dc
...
...
@@ -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 successful
l
.
// 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 cor
r
esponding 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 cor
r
esponding 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
));
...
...
absl/functional/function_ref.h
View file @
421a74dc
...
...
@@ -66,11 +66,11 @@ class FunctionRef;
// FunctionRef
//
// An `absl::FunctionRef` is a lightweight wrapper to any invo
k
able object with
// An `absl::FunctionRef` is a lightweight wrapper to any invo
c
able 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 invo
k
able may.
// although the wrapped invo
c
able may.
//
// Example:
//
...
...
@@ -98,7 +98,7 @@ class FunctionRef<R(Args...)> {
std
::
is_convertible
<
FR
,
R
>::
value
>::
type
;
public
:
// Constructs a FunctionRef from any invo
k
able type.
// Constructs a FunctionRef from any invo
c
able type.
template
<
typename
F
,
typename
=
EnableIfCompatible
<
const
F
&>>
// NOLINTNEXTLINE(runtime/explicit)
FunctionRef
(
const
F
&
f
ABSL_ATTRIBUTE_LIFETIME_BOUND
)
...
...
absl/functional/internal/any_invocable.h
View file @
421a74dc
...
...
@@ -488,7 +488,7 @@ class CoreImpl {
// object.
Clear
();
// Perform the actual move/dest
or
y operation on the target function.
// Perform the actual move/dest
ro
y operation on the target function.
other
.
manager_
(
FunctionToCall
::
relocate_from_to
,
&
other
.
state_
,
&
state_
);
manager_
=
other
.
manager_
;
invoker_
=
other
.
invoker_
;
...
...
absl/hash/hash.h
View file @
421a74dc
...
...
@@ -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
// bound
a
ries 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
...
...
absl/log/internal/log_format.cc
View file @
421a74dc
...
...
@@ -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 supp
p
orts 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
)
{
...
...
absl/log/internal/test_helpers.cc
View file @
421a74dc
...
...
@@ -68,7 +68,7 @@ bool DiedOfQFatal(int exit_status) {
#endif
// -----------------------------------------------------------------------------
// Helper for Log initi
t
alization in test
// Helper for Log initialization in test
// -----------------------------------------------------------------------------
void
LogTestEnvironment
::
SetUp
()
{
...
...
absl/log/internal/test_helpers.h
View file @
421a74dc
...
...
@@ -54,7 +54,7 @@ bool DiedOfQFatal(int exit_status);
#endif
// -----------------------------------------------------------------------------
// Helper for Log initi
t
alization in test
// Helper for Log initialization in test
// -----------------------------------------------------------------------------
class
LogTestEnvironment
:
public
::
testing
::
Environment
{
...
...
absl/random/generators_test.cc
View file @
421a74dc
...
...
@@ -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.
// Explic
i
t overriding of types.
absl
::
Uniform
<
int
>
(
*
gen
,
0
,
100
);
absl
::
Uniform
<
int8_t
>
(
*
gen
,
0
,
100
);
absl
::
Uniform
<
int16_t
>
(
*
gen
,
0
,
100
);
...
...
absl/random/internal/distribution_test_util.cc
View file @
421a74dc
...
...
@@ -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 for
um
la.
// Use the soper reduction for
mu
la.
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, al
hp
a)
// XINBTA(p, q, beta, al
ph
a)
// p: the value of the parameter p.
// q: the value of the parameter q.
// beta: the value of ln B(p, q)
...
...
absl/random/internal/randen_engine.h
View file @
421a74dc
...
...
@@ -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 prefer
r
ing 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
;
...
...
absl/strings/charconv.cc
View file @
421a74dc
...
...
@@ -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 represen
t
ation.
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 alway
s
round up.
if
((
value
&
1
)
==
1
||
!
input_exact
)
{
++
value
;
}
...
...
absl/strings/charconv.h
View file @
421a74dc
...
...
@@ -22,7 +22,7 @@
namespace
absl
{
ABSL_NAMESPACE_BEGIN
// Workalike compatibilty version of std::chars_format from C++17.
// Workalike compatibil
i
ty 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 compatibil
i
ty 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
...
...
absl/strings/cord.cc
View file @
421a74dc
...
...
@@ -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. Differe
n
t 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
>
...
...
absl/strings/cord.h
View file @
421a74dc
...
...
@@ -661,7 +661,7 @@ class Cord {
class
CharRange
{
public
:
// Fulfill minimum c++ container requirements [container.requirements]
// These
s
(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
;
...
...
absl/strings/cord_test_helpers.h
View file @
421a74dc
...
...
@@ -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 mu
tl
iple flats.
// A string value large enough to cause it to be stored in mu
lt
iple flats.
kLarge
=
cord_internal
::
kMaxFlatLength
*
4
};
...
...
absl/strings/internal/charconv_bigint.h
View file @
421a74dc
...
...
@@ -92,7 +92,7 @@ class BigUnsigned {
// numbers with this many decimal digits or fewer are representable by this
// type.
//
// Anal
a
gous to std::numeric_limits<BigUnsigned>::digits10.
// Anal
o
gous 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
;
...
...
absl/strings/internal/cord_rep_btree_test.cc
View file @
421a74dc
...
...
@@ -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
// iter
r
ations 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
// iter
r
ations 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
());
...
...
absl/strings/internal/cord_rep_ring.h
View file @
421a74dc
...
...
@@ -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
);
// De
s
creases 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_
;
...
...
absl/strings/internal/cordz_functions_test.cc
View file @
421a74dc
...
...
@@ -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 di
s
abled, so we might want to
// avoid those tests.
#ifdef ABSL_INTERNAL_CORDZ_ENABLED
...
...
absl/strings/internal/cordz_info.cc
View file @
421a74dc
...
...
@@ -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
// sub
s
tract 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:
...
...
absl/strings/internal/cordz_sample_token.h
View file @
421a74dc
...
...
@@ -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 refere
n
ce 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
...
...
absl/strings/internal/damerau_levenshtein_distance_test.cc
View file @
421a74dc
...
...
@@ -54,7 +54,7 @@ TEST(Distance, TestDistances) {
}
TEST
(
Distance
,
TestCutoff
)
{
// Returing cutoff + 1 if the value is larger than cutoff or string longer
// Retur
n
ing 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
});
...
...
absl/strings/internal/str_format/float_conversion.cc
View file @
421a74dc
...
...
@@ -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 requ
e
sted
// 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
...
...
absl/strings/numbers.cc
View file @
421a74dc
...
...
@@ -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++ app
a
rently warns for plain "-u", so
// we write the equivalent expression "0 - u" instead.
u
=
0
-
u
;
}
...
...
absl/time/internal/cctz/src/time_zone_posix.h
View file @
421a74dc
...
...
@@ -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 abbrev
i
ation 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.
...
...
absl/types/internal/span.h
View file @
421a74dc
...
...
@@ -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 param
e
ters lists.
template
<
typename
T
>
using
EnableIfIsView
=
std
::
enable_if_t
<
IsView
<
T
>::
value
,
int
>
;
...
...
create_lts.py
View file @
421a74dc
...
...
@@ -33,7 +33,7 @@ def ReplaceStringsInFile(filename, replacement_dict):
values
Raises:
Exception: A failure occured
Exception: A failure occur
r
ed
"""
f
=
open
(
filename
,
'r'
)
content
=
f
.
read
()
...
...
@@ -62,7 +62,7 @@ def StripContentBetweenTags(filename, strip_begin_tag, strip_end_tag):
strip_end_tag: the end of the content to be removed
Raises:
Exception: A failure occured
Exception: A failure occur
r
ed
"""
f
=
open
(
filename
,
'r'
)
content
=
f
.
read
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment