}
auto readInt = [&] {
- auto const b = p;
+ auto const c = p;
do {
++p;
} while (p != end && *p >= '0' && *p <= '9');
- return to<int>(StringPiece(b, p));
+ return to<int>(StringPiece(c, p));
};
if (*p == '*') {
}
if (*p == '.') {
- auto b = ++p;
+ auto d = ++p;
while (p != end && *p >= '0' && *p <= '9') {
++p;
}
- if (p != b) {
- precision = to<int>(StringPiece(b, p));
+ if (p != d) {
+ precision = to<int>(StringPiece(d, p));
if (p != end && *p == '.') {
trailingDot = true;
++p;
* A structure to free a struct addrinfo when it goes out of scope.
*/
struct ScopedAddrInfo {
- explicit ScopedAddrInfo(struct addrinfo* info) : info(info) {}
+ explicit ScopedAddrInfo(struct addrinfo* addrinfo) : info(addrinfo) {}
~ScopedAddrInfo() {
freeaddrinfo(info);
}
// Now, we can do aligned loads hereafter...
size_t i = nextAlignedIndex(haystack.data());
for (; i < haystack.size(); i+= 16) {
- auto arr1 = _mm_load_si128(
- reinterpret_cast<const __m128i*>(haystack.data() + i));
- auto index = _mm_cmpestri(
- arr2, needles.size(),
- arr1, haystack.size() - i, 0);
+ arr1 =
+ _mm_load_si128(reinterpret_cast<const __m128i*>(haystack.data() + i));
+ index = _mm_cmpestri(arr2, needles.size(), arr1, haystack.size() - i, 0);
if (index < 16) {
return i + index;
}
size_t i = nextAlignedIndex(haystack.data());
for (; i < haystack.size(); i += 16) {
- auto ret = scanHaystackBlock<true>(haystack, needles, i);
+ ret = scanHaystackBlock<true>(haystack, needles, i);
if (ret != std::string::npos) {
return ret;
}