Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in strings/, except /internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 468205572
Change-Id: Ifce3f1a7a4b2b2c359bf7700a11279bebfef8a15
The change breaks existing code by changing the return type of absl::bit_width.
PiperOrigin-RevId: 465295951
Change-Id: Id4ce7c2ac3699ce22aa2b4851a949f9e0104a3d7
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in strings/, except /internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 465285043
Change-Id: I37e9d1b4c4e9aa655b720da1467927af2aba995e
--
92811d3307196b2810bdc3c7e50ef9544db3f23b by CJ Johnson <johnsoncj@google.com>:
Refactor InlinedVector's OverheadTest.Storage test to be easier to understand and modify in the future
PiperOrigin-RevId: 342718098
--
cf3f2af201775f9c4e68dd2f9806126aecbd0748 by Abseil Team <absl-team@google.com>:
Implement `reserve` more explicit to avoid calling `rehash`.
`reserve` is much more widely used method and doesn't need extra logic present in `rehash`.
E. g., accidental `t.reserve(0)` on non empty table shouldn't cause rehashing, which was a case before this change.
It also remove some unnecessary computations from `reserve`.
Was:
```
GrowthToLowerboundCapacity 2x
NormalizeCapacity 1x
bitwise | 1x
n == 0 && capacity_ == 0 1x
n == 0 && size_ == 0 1x
n == 0 1x
|| 1x
m > capacity_ 1x
overall branches 6x
(GrowthToLowerboundCapacity 2x, NormalizeCapacity 1x, rehash 3x)
```
Now:
```
GrowthToLowerboundCapacity 1x
NormalizeCapacity 1x
bitwise | 0x
n == 0 && capacity_ == 0 0x
n == 0 && size_ == 0 0x
n == 0 0x
|| 0x
m > capacity_ 1x
overall branches 3x
(GrowthToLowerboundCapacity 1x, NormalizeCapacity 1x, reserve 1x)
```
PiperOrigin-RevId: 342714022
--
c2ab8c1e4091ff685110c81bae12e3567e0cded3 by Abseil Team <absl-team@google.com>:
Remove `reset_growth_left` call, which already happen in `initialize_slots`.
PiperOrigin-RevId: 342701073
--
3f41ccb70afabec8bc0dcfcca3e3ac918726bb92 by Derek Mauro <dmauro@google.com>:
Use memmove instead of memcpy in situations where the source and
destination may point to the same buffer
Note that the OSS Abseil code never calls CUnescapeInternal with
leave_nulls_scaped=true, so there is no bug in the OSS code.
Fixes#844
PiperOrigin-RevId: 342633781
--
57afb2c307b008b9f9daaa736b49c066e0075e39 by Abseil Team <absl-team@google.com>:
Add absl::Round() for absl::Duration as a complementary to Floor, Ceil and Trunc. Rounding halfway cases away from zero as std::round() does.
PiperOrigin-RevId: 342610871
--
c49754ecddb9339eff60b826dc17b3b459333bc0 by Abseil Team <absl-team@google.com>:
Add absl::Round() for absl::Duration as a complementary to Floor, Ceil and Trunc. Rounding halfway cases away from zero as std::round() does.
PiperOrigin-RevId: 342594847
--
b51bd29233aaee6ef241de984635356d26c93e4d by Abseil Team <absl-team@google.com>:
Move `ConvertDeletedToEmptyAndFullToDeleted` to cc file.
This function is cold and only used when table become polluted with deleted slots.
So this shouldn't negatively affect performance and considered safe.
This change is reducing linkage and binary size.
PiperOrigin-RevId: 342319685
--
acb83c004d14e563a3b47dcfcb6c5508bee6408f by Abseil Team <absl-team@google.com>:
Fix indentation in uniform_int_distribution.h.
PiperOrigin-RevId: 342297575
GitOrigin-RevId: 92811d3307196b2810bdc3c7e50ef9544db3f23b
Change-Id: I4fbaf4aab122d5c939ae9a3ef46ee8cca3df75e6
--
f012012ef78234a6a4585321b67d7b7c92ebc266 by Laramie Leavitt <lar@google.com>:
Slight restructuring of absl/random/internal randen implementation.
Convert round-keys.inc into randen_round_keys.cc file.
Consistently use a 128-bit pointer type for internal method parameters. This allows simpler pointer arithmetic in C++ & permits removal of some constants and casts.
Remove some redundancy in comments & constexpr variables. Specifically, all references to Randen algorithm parameters use RandenTraits; duplication in RandenSlow removed.
PiperOrigin-RevId: 312190313
--
dc8b42e054046741e9ed65335bfdface997c6063 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 312167304
--
f13d248fafaf206492c1362c3574031aea3abaf7 by Matthew Brown <matthewbr@google.com>:
Cleanup StrFormat extensions a little.
PiperOrigin-RevId: 312166336
--
9d9117589667afe2332bb7ad42bc967ca7c54502 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 312105213
--
9a12b9b3aa0e59b8ee6cf9408ed0029045543a9b by Abseil Team <absl-team@google.com>:
Complete IGNORE_TYPE macro renaming.
PiperOrigin-RevId: 311999699
--
64756f20d61021d999bd0d4c15e9ad3857382f57 by Gennadiy Rozental <rogeeff@google.com>:
Switch to fixed bytes specific default value.
This fixes the Abseil Flags for big endian platforms.
PiperOrigin-RevId: 311844448
--
bdbe6b5b29791dbc3816ada1828458b3010ff1e9 by Laramie Leavitt <lar@google.com>:
Change many distribution tests to use pcg_engine as a deterministic source of entropy.
It's reasonable to test that the BitGen itself has good entropy, however when testing the cross product of all random distributions x all the architecture variations x all submitted changes results in a large number of tests. In order to account for these failures while still using good entropy requires that our allowed sigma need to account for all of these independent tests.
Our current sigma values are too restrictive, and we see a lot of failures, so we have to either relax the sigma values or convert some of the statistical tests to use deterministic values.
This changelist does the latter.
PiperOrigin-RevId: 311840096
GitOrigin-RevId: f012012ef78234a6a4585321b67d7b7c92ebc266
Change-Id: Ic84886f38ff30d7d72c126e9b63c9a61eb729a1a