projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow fiber executor to override fiber options
[folly.git]
/
folly
/
String.cpp
diff --git
a/folly/String.cpp
b/folly/String.cpp
index af86c668f3135105fffc16877d8393eef1f6d917..097e5bbfd4c7b2cd86ed2b388ee557bea5124952 100644
(file)
--- a/
folly/String.cpp
+++ b/
folly/String.cpp
@@
-16,17
+16,17
@@
#include <folly/String.h>
#include <folly/String.h>
-#include <folly/ScopeGuard.h>
-
+#include <cctype>
#include <cerrno>
#include <cstdarg>
#include <cstring>
#include <cerrno>
#include <cstdarg>
#include <cstring>
-#include <stdexcept>
#include <iterator>
#include <iterator>
-#include <
cctype
>
-#include <string.h>
+#include <
stdexcept
>
+
#include <glog/logging.h>
#include <glog/logging.h>
+#include <folly/ScopeGuard.h>
+
namespace folly {
static inline bool is_oddspace(char c) {
namespace folly {
static inline bool is_oddspace(char c) {
@@
-118,7
+118,7
@@
void stringAppendfImpl(std::string& output, const char* format, va_list args) {
output.append(heap_buffer.get(), size_t(final_bytes_used));
}
output.append(heap_buffer.get(), size_t(final_bytes_used));
}
-} //
anon
namespace
+} // namespace
std::string stringPrintf(const char* format, ...) {
va_list ap;
std::string stringPrintf(const char* format, ...) {
va_list ap;
@@
-181,7
+181,7
@@
const PrettySuffix kPrettyTimeSuffixes[] = {
{ "ns", 1e-9L },
{ "ps", 1e-12L },
{ "s ", 0 },
{ "ns", 1e-9L },
{ "ps", 1e-12L },
{ "s ", 0 },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettyBytesMetricSuffixes[] = {
};
const PrettySuffix kPrettyBytesMetricSuffixes[] = {
@@
-190,7
+190,7
@@
const PrettySuffix kPrettyBytesMetricSuffixes[] = {
{ "MB", 1e6L },
{ "kB", 1e3L },
{ "B ", 0L },
{ "MB", 1e6L },
{ "kB", 1e3L },
{ "B ", 0L },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettyBytesBinarySuffixes[] = {
};
const PrettySuffix kPrettyBytesBinarySuffixes[] = {
@@
-199,7
+199,7
@@
const PrettySuffix kPrettyBytesBinarySuffixes[] = {
{ "MB", int64_t(1) << 20 },
{ "kB", int64_t(1) << 10 },
{ "B ", 0L },
{ "MB", int64_t(1) << 20 },
{ "kB", int64_t(1) << 10 },
{ "B ", 0L },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettyBytesBinaryIECSuffixes[] = {
};
const PrettySuffix kPrettyBytesBinaryIECSuffixes[] = {
@@
-208,7
+208,7
@@
const PrettySuffix kPrettyBytesBinaryIECSuffixes[] = {
{ "MiB", int64_t(1) << 20 },
{ "KiB", int64_t(1) << 10 },
{ "B ", 0L },
{ "MiB", int64_t(1) << 20 },
{ "KiB", int64_t(1) << 10 },
{ "B ", 0L },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettyUnitsMetricSuffixes[] = {
};
const PrettySuffix kPrettyUnitsMetricSuffixes[] = {
@@
-217,7
+217,7
@@
const PrettySuffix kPrettyUnitsMetricSuffixes[] = {
{ "M", 1e6L },
{ "k", 1e3L },
{ " ", 0 },
{ "M", 1e6L },
{ "k", 1e3L },
{ " ", 0 },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettyUnitsBinarySuffixes[] = {
};
const PrettySuffix kPrettyUnitsBinarySuffixes[] = {
@@
-226,7
+226,7
@@
const PrettySuffix kPrettyUnitsBinarySuffixes[] = {
{ "M", int64_t(1) << 20 },
{ "k", int64_t(1) << 10 },
{ " ", 0 },
{ "M", int64_t(1) << 20 },
{ "k", int64_t(1) << 10 },
{ " ", 0 },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettyUnitsBinaryIECSuffixes[] = {
};
const PrettySuffix kPrettyUnitsBinaryIECSuffixes[] = {
@@
-235,7
+235,7
@@
const PrettySuffix kPrettyUnitsBinaryIECSuffixes[] = {
{ "Mi", int64_t(1) << 20 },
{ "Ki", int64_t(1) << 10 },
{ " ", 0 },
{ "Mi", int64_t(1) << 20 },
{ "Ki", int64_t(1) << 10 },
{ " ", 0 },
- {
0
, 0 },
+ {
nullptr
, 0 },
};
const PrettySuffix kPrettySISuffixes[] = {
};
const PrettySuffix kPrettySISuffixes[] = {
@@
-260,7
+260,7
@@
const PrettySuffix kPrettySISuffixes[] = {
{ "z", 1e-21L },
{ "y", 1e-24L },
{ " ", 0 },
{ "z", 1e-21L },
{ "y", 1e-24L },
{ " ", 0 },
- {
0
, 0}
+ {
nullptr
, 0}
};
const PrettySuffix* const kPrettySuffixes[PRETTY_NUM_TYPES] = {
};
const PrettySuffix* const kPrettySuffixes[PRETTY_NUM_TYPES] = {
@@
-274,7
+274,7
@@
const PrettySuffix* const kPrettySuffixes[PRETTY_NUM_TYPES] = {
kPrettySISuffixes,
};
kPrettySISuffixes,
};
-}
// namespace
+} // namespace
std::string prettyPrint(double val, PrettyType type, bool addSpace) {
char buf[100];
std::string prettyPrint(double val, PrettyType type, bool addSpace) {
char buf[100];
@@
-489,7
+489,7
@@
void toLowerAscii64(uint64_t& c) {
c += rotated;
}
c += rotated;
}
-} //
anon
namespace
+} // namespace
void toLowerAscii(char* str, size_t length) {
static const size_t kAlignMask64 = 7;
void toLowerAscii(char* str, size_t length) {
static const size_t kAlignMask64 = 7;
@@
-638,7
+638,7
@@
std::string stripLeftMargin(std::string s) {
return join("\n", piecer);
}
return join("\n", piecer);
}
-}
// namespace folly
+} // namespace folly
#ifdef FOLLY_DEFINED_DMGL
# undef FOLLY_DEFINED_DMGL
#ifdef FOLLY_DEFINED_DMGL
# undef FOLLY_DEFINED_DMGL