Commit 9f4a587c authored by Nicholas Ormrod's avatar Nicholas Ormrod Committed by Anton Likhtarov

Fix lint errors

Summary: Lines exceeding 80 characters have been restructured.

Test Plan:
fbconfig -r folly && fbmake runtests

Reviewed By: robbert@fb.com

Subscribers: trunkagent, sdwilsh, fugalh, njormrod

FB internal diff: D1568086
parent b6ee36ab
......@@ -769,7 +769,8 @@ class ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT>::Skipper {
findInsertionPoint(preds_[lyr], lyr, data, preds_, succs_);
if (foundLayer < 0) return false;
DCHECK(succs_[0] != nullptr) << "lyr=" << lyr << "; max_layer=" << max_layer;
DCHECK(succs_[0] != nullptr) << "lyr=" << lyr
<< "; max_layer=" << max_layer;
return !succs_[0]->markedForRemoval();
}
......
......@@ -143,18 +143,18 @@ public:
uint64_t &s4, uint64_t &s5, uint64_t &s6, uint64_t &s7,
uint64_t &s8, uint64_t &s9, uint64_t &s10,uint64_t &s11)
{
s0 += data[0]; s2 ^= s10; s11 ^= s0; s0 = Rot64(s0,11); s11 += s1;
s1 += data[1]; s3 ^= s11; s0 ^= s1; s1 = Rot64(s1,32); s0 += s2;
s2 += data[2]; s4 ^= s0; s1 ^= s2; s2 = Rot64(s2,43); s1 += s3;
s3 += data[3]; s5 ^= s1; s2 ^= s3; s3 = Rot64(s3,31); s2 += s4;
s4 += data[4]; s6 ^= s2; s3 ^= s4; s4 = Rot64(s4,17); s3 += s5;
s5 += data[5]; s7 ^= s3; s4 ^= s5; s5 = Rot64(s5,28); s4 += s6;
s6 += data[6]; s8 ^= s4; s5 ^= s6; s6 = Rot64(s6,39); s5 += s7;
s7 += data[7]; s9 ^= s5; s6 ^= s7; s7 = Rot64(s7,57); s6 += s8;
s8 += data[8]; s10 ^= s6; s7 ^= s8; s8 = Rot64(s8,55); s7 += s9;
s9 += data[9]; s11 ^= s7; s8 ^= s9; s9 = Rot64(s9,54); s8 += s10;
s10 += data[10]; s0 ^= s8; s9 ^= s10; s10 = Rot64(s10,22); s9 += s11;
s11 += data[11]; s1 ^= s9; s10 ^= s11; s11 = Rot64(s11,46); s10 += s0;
s0 += data[0]; s2 ^= s10; s11 ^= s0; s0 = Rot64(s0,11); s11 += s1;
s1 += data[1]; s3 ^= s11; s0 ^= s1; s1 = Rot64(s1,32); s0 += s2;
s2 += data[2]; s4 ^= s0; s1 ^= s2; s2 = Rot64(s2,43); s1 += s3;
s3 += data[3]; s5 ^= s1; s2 ^= s3; s3 = Rot64(s3,31); s2 += s4;
s4 += data[4]; s6 ^= s2; s3 ^= s4; s4 = Rot64(s4,17); s3 += s5;
s5 += data[5]; s7 ^= s3; s4 ^= s5; s5 = Rot64(s5,28); s4 += s6;
s6 += data[6]; s8 ^= s4; s5 ^= s6; s6 = Rot64(s6,39); s5 += s7;
s7 += data[7]; s9 ^= s5; s6 ^= s7; s7 = Rot64(s7,57); s6 += s8;
s8 += data[8]; s10 ^= s6; s7 ^= s8; s8 = Rot64(s8,55); s7 += s9;
s9 += data[9]; s11 ^= s7; s8 ^= s9; s9 = Rot64(s9,54); s8 += s10;
s10 += data[10]; s0 ^= s8; s9 ^= s10; s10 = Rot64(s10,22); s9 += s11;
s11 += data[11]; s1 ^= s9; s10 ^= s11; s11 = Rot64(s11,46); s10 += s0;
}
//
......@@ -217,7 +217,8 @@ public:
// with diffs defined by either xor or subtraction
// with a base of all zeros plus a counter, or plus another bit, or random
//
static inline void ShortMix(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3)
static inline void ShortMix(uint64_t &h0, uint64_t &h1,
uint64_t &h2, uint64_t &h3)
{
h2 = Rot64(h2,50); h2 += h3; h0 ^= h2;
h3 = Rot64(h3,52); h3 += h0; h1 ^= h3;
......@@ -245,7 +246,8 @@ public:
// For every pair of input bits,
// with probability 50 +- .75% (the worst case is approximately that)
//
static inline void ShortEnd(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3)
static inline void ShortEnd(uint64_t &h0, uint64_t &h1,
uint64_t &h2, uint64_t &h3)
{
h3 ^= h2; h2 = Rot64(h2,15); h3 += h2;
h0 ^= h3; h3 = Rot64(h3,52); h0 += h3;
......@@ -269,7 +271,7 @@ private:
// held to the same quality bar.
//
static void Short(
const void *message, // message (array of bytes, not necessarily aligned)
const void *message, // message (byte array, not necessarily aligned)
size_t length, // length of message (in bytes)
uint64_t *hash1, // in/out: in the seed, out the hash value
uint64_t *hash2); // in/out: in the seed, out the hash value
......
......@@ -23,7 +23,8 @@
// April 10 2012: buffer overflow on platforms without unaligned reads
// July 12 2012: was passing out variables in final to in/out in short
// July 30 2012: I reintroduced the buffer overflow
// August 5 2012: SpookyV2: d = should be d += in short hash, and remove extra mix from long hash
// August 5 2012: SpookyV2: d = should be d += in short hash, and remove
// extra mix from long hash
#include <folly/SpookyHashV2.h>
......
......@@ -144,18 +144,18 @@ public:
uint64_t &s4, uint64_t &s5, uint64_t &s6, uint64_t &s7,
uint64_t &s8, uint64_t &s9, uint64_t &s10,uint64_t &s11)
{
s0 += data[0]; s2 ^= s10; s11 ^= s0; s0 = Rot64(s0,11); s11 += s1;
s1 += data[1]; s3 ^= s11; s0 ^= s1; s1 = Rot64(s1,32); s0 += s2;
s2 += data[2]; s4 ^= s0; s1 ^= s2; s2 = Rot64(s2,43); s1 += s3;
s3 += data[3]; s5 ^= s1; s2 ^= s3; s3 = Rot64(s3,31); s2 += s4;
s4 += data[4]; s6 ^= s2; s3 ^= s4; s4 = Rot64(s4,17); s3 += s5;
s5 += data[5]; s7 ^= s3; s4 ^= s5; s5 = Rot64(s5,28); s4 += s6;
s6 += data[6]; s8 ^= s4; s5 ^= s6; s6 = Rot64(s6,39); s5 += s7;
s7 += data[7]; s9 ^= s5; s6 ^= s7; s7 = Rot64(s7,57); s6 += s8;
s8 += data[8]; s10 ^= s6; s7 ^= s8; s8 = Rot64(s8,55); s7 += s9;
s9 += data[9]; s11 ^= s7; s8 ^= s9; s9 = Rot64(s9,54); s8 += s10;
s10 += data[10]; s0 ^= s8; s9 ^= s10; s10 = Rot64(s10,22); s9 += s11;
s11 += data[11]; s1 ^= s9; s10 ^= s11; s11 = Rot64(s11,46); s10 += s0;
s0 += data[0]; s2 ^= s10; s11 ^= s0; s0 = Rot64(s0,11); s11 += s1;
s1 += data[1]; s3 ^= s11; s0 ^= s1; s1 = Rot64(s1,32); s0 += s2;
s2 += data[2]; s4 ^= s0; s1 ^= s2; s2 = Rot64(s2,43); s1 += s3;
s3 += data[3]; s5 ^= s1; s2 ^= s3; s3 = Rot64(s3,31); s2 += s4;
s4 += data[4]; s6 ^= s2; s3 ^= s4; s4 = Rot64(s4,17); s3 += s5;
s5 += data[5]; s7 ^= s3; s4 ^= s5; s5 = Rot64(s5,28); s4 += s6;
s6 += data[6]; s8 ^= s4; s5 ^= s6; s6 = Rot64(s6,39); s5 += s7;
s7 += data[7]; s9 ^= s5; s6 ^= s7; s7 = Rot64(s7,57); s6 += s8;
s8 += data[8]; s10 ^= s6; s7 ^= s8; s8 = Rot64(s8,55); s7 += s9;
s9 += data[9]; s11 ^= s7; s8 ^= s9; s9 = Rot64(s9,54); s8 += s10;
s10 += data[10]; s0 ^= s8; s9 ^= s10; s10 = Rot64(s10,22); s9 += s11;
s11 += data[11]; s1 ^= s9; s10 ^= s11; s11 = Rot64(s11,46); s10 += s0;
}
//
......@@ -222,7 +222,8 @@ public:
// with diffs defined by either xor or subtraction
// with a base of all zeros plus a counter, or plus another bit, or random
//
static inline void ShortMix(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3)
static inline void ShortMix(uint64_t &h0, uint64_t &h1,
uint64_t &h2, uint64_t &h3)
{
h2 = Rot64(h2,50); h2 += h3; h0 ^= h2;
h3 = Rot64(h3,52); h3 += h0; h1 ^= h3;
......@@ -250,7 +251,8 @@ public:
// For every pair of input bits,
// with probability 50 +- .75% (the worst case is approximately that)
//
static inline void ShortEnd(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3)
static inline void ShortEnd(uint64_t &h0, uint64_t &h1,
uint64_t &h2, uint64_t &h3)
{
h3 ^= h2; h2 = Rot64(h2,15); h3 += h2;
h0 ^= h3; h3 = Rot64(h3,52); h0 += h3;
......@@ -274,7 +276,7 @@ private:
// held to the same quality bar.
//
static void Short(
const void *message, // message (array of bytes, not necessarily aligned)
const void *message, // message (byte array, not necessarily aligned)
size_t length, // length of message (in bytes)
uint64_t *hash1, // in/out: in the seed, out the hash value
uint64_t *hash2); // in/out: in the seed, out the hash value
......
......@@ -30,7 +30,8 @@ size_t xallocx(void*, size_t, size_t, int) __attribute__((__weak__));
size_t sallocx(const void*, int) __attribute__((__weak__));
void dallocx(void*, int) __attribute__((__weak__));
size_t nallocx(size_t, int) __attribute__((__weak__));
int mallctl(const char*, void*, size_t*, void*, size_t) __attribute__((__weak__));
int mallctl(const char*, void*, size_t*, void*, size_t)
__attribute__((__weak__));
#else
extern void* (*mallocx)(size_t, int);
extern void* (*rallocx)(void*, size_t, int);
......
......@@ -56,8 +56,8 @@ void CPUThreadPoolExecutor::threadRun(std::shared_ptr<Thread> thread) {
LOG(ERROR) << "CPUThreadPoolExecutor: func threw unhandled " <<
typeid(e).name() << " exception: " << e.what();
} catch (...) {
LOG(ERROR) << "CPUThreadPoolExecutor: func threw unhandled non-exception "
"object";
LOG(ERROR) << "CPUThreadPoolExecutor: func threw unhandled "
"non-exception object";
}
thread->idle = true;
}
......
......@@ -74,7 +74,8 @@ private:
};
// fastest conceivable hash function (for comparison)
static void Add(const void *data, size_t length, uint64_t *hash1, uint64_t *hash2)
static void Add(const void *data, size_t length,
uint64_t *hash1, uint64_t *hash2)
{
uint64_t *p64 = (uint64_t *)data;
uint64_t *end = p64 + length/8;
......@@ -426,8 +427,10 @@ void TestDeltas(int seed)
{
buf1[j/8] ^= (1 << (j%8));
}
SpookyHashV1::Hash128(buf1, h, &measure[0][0], &measure[0][1]);
SpookyHashV1::Hash128(buf2, h, &measure[1][0], &measure[1][1]);
SpookyHashV1::Hash128(buf1, h,
&measure[0][0], &measure[0][1]);
SpookyHashV1::Hash128(buf2, h,
&measure[1][0], &measure[1][1]);
for (int l=0; l<2; ++l) {
measure[2][l] = measure[0][l] ^ measure[1][l];
measure[3][l] = ~(measure[0][l] ^ measure[1][l]);
......
This diff is collapsed.
......@@ -257,7 +257,8 @@ Future<T> makeFuture(std::exception_ptr const& e) {
}
template <class T, class E>
typename std::enable_if<std::is_base_of<std::exception, E>::value, Future<T>>::type
typename std::enable_if<std::is_base_of<std::exception, E>::value,
Future<T>>::type
makeFuture(E const& e) {
Promise<T> p;
auto f = p.getFuture();
......
......@@ -261,7 +261,8 @@ Future<T> makeFuture(std::exception_ptr const& e);
/** Make a Future from an exception type E that can be passed to
std::make_exception_ptr(). */
template <class T, class E>
typename std::enable_if<std::is_base_of<std::exception, E>::value, Future<T>>::type
typename std::enable_if<std::is_base_of<std::exception, E>::value,
Future<T>>::type
makeFuture(E const& e);
/** Make a Future out of a Try */
......
......@@ -56,7 +56,8 @@ aFunction(Params...) {
template <class Ret, class... Params>
std::function<Ret(Params...)>
aStdFunction(typename std::enable_if<!isFuture<Ret>::value, bool>::type = false) {
aStdFunction(
typename std::enable_if<!isFuture<Ret>::value, bool>::type = false) {
return [](Params...) -> Ret { return Ret(); };
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment