- 3a9532fb2d6ae45c3cba44c9bb0dbdfc1558b7d3 Fix the description of Span::subspan(). by Abseil Team <absl-team@google.com>
- bae1a1c21924bd31fa7315eff05ea6158d9e7947 Port the symbolizer to Windows. by Derek Mauro <dmauro@google.com> - 2253c04c1a4f39d9581772f1dc4491878aa3831f Support absl::Hex() and absl::Dec() as arguments to absl:... by Jorg Brown <jorg@google.com> - 552c3ac259e9c254fda9244755487f3423d2fe4b Internal change by Jorg Brown <jorg@google.com> GitOrigin-RevId: 3a9532fb2d6ae45c3cba44c9bb0dbdfc1558b7d3 Change-Id: I448133c9bb6d837037c12b45a9a16a7945049453
This commit is contained in:
parent
af7882601a
commit
19b3c95727
10 changed files with 223 additions and 26 deletions
|
|
@ -76,7 +76,7 @@
|
|||
#include "absl/strings/ascii.h"
|
||||
#include "absl/strings/escaping.h"
|
||||
#include "absl/strings/numbers.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/strings/strip.h"
|
||||
|
|
@ -113,10 +113,10 @@ class Arg {
|
|||
// what to do.
|
||||
Arg(char value) // NOLINT(runtime/explicit)
|
||||
: piece_(scratch_, 1) { scratch_[0] = value; }
|
||||
Arg(short value) // NOLINT(runtime/explicit)
|
||||
Arg(short value) // NOLINT(*)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(unsigned short value) // NOLINT(runtime/explicit)
|
||||
Arg(unsigned short value) // NOLINT(*)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(int value) // NOLINT(runtime/explicit)
|
||||
|
|
@ -125,16 +125,16 @@ class Arg {
|
|||
Arg(unsigned int value) // NOLINT(runtime/explicit)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(long value) // NOLINT(runtime/explicit)
|
||||
Arg(long value) // NOLINT(*)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(unsigned long value) // NOLINT(runtime/explicit)
|
||||
Arg(unsigned long value) // NOLINT(*)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(long long value) // NOLINT(runtime/explicit)
|
||||
Arg(long long value) // NOLINT(*)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(unsigned long long value) // NOLINT(runtime/explicit)
|
||||
Arg(unsigned long long value) // NOLINT(*)
|
||||
: piece_(scratch_,
|
||||
numbers_internal::FastIntToBuffer(value, scratch_) - scratch_) {}
|
||||
Arg(float value) // NOLINT(runtime/explicit)
|
||||
|
|
@ -145,6 +145,10 @@ class Arg {
|
|||
}
|
||||
Arg(bool value) // NOLINT(runtime/explicit)
|
||||
: piece_(value ? "true" : "false") {}
|
||||
|
||||
Arg(Hex hex); // NOLINT(runtime/explicit)
|
||||
Arg(Dec dec); // NOLINT(runtime/explicit)
|
||||
|
||||
// `void*` values, with the exception of `char*`, are printed as
|
||||
// "0x<hex value>". However, in the case of `nullptr`, "NULL" is printed.
|
||||
Arg(const void* value); // NOLINT(runtime/explicit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue