/*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2012-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_SLOWFINGERPRINT_H_
-#define FOLLY_DETAIL_SLOWFINGERPRINT_H_
+#pragma once
#include <folly/Fingerprint.h>
-#include <folly/detail/FingerprintPolynomial.h>
#include <folly/Range.h>
+#include <folly/detail/FingerprintPolynomial.h>
namespace folly {
namespace detail {
return *this;
}
- SlowFingerprint& update(const folly::StringPiece& str) {
+ SlowFingerprint& update(const folly::StringPiece str) {
const char* p = str.start();
for (int i = str.size(); i != 0; p++, i--) {
update8(static_cast<uint8_t>(*p));
void updateLSB(uint64_t val, int bits) {
val <<= (64-bits);
for (; bits != 0; --bits) {
- updateBit(val & (1UL << 63));
+ updateBit(val & (1ULL << 63));
val <<= 1;
}
}
FingerprintPolynomial<BITS-1> fp_;
};
-} // namespace detail
-} // namespace folly
-
-#endif /* FOLLY_DETAIL_SLOWFINGERPRINT_H_ */
-
+} // namespace detail
+} // namespace folly