X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fdetail%2FSlowFingerprint.h;h=b0721fdef9f4df316d665e35d3d7470385b54111;hb=1672380910a8c21cd36095661eb1360f43c93332;hp=42cc3a1bef9e27a05c5c81f584883f64ae64ae75;hpb=22afce906d7e98d95f8c45c3301072d9fd891d41;p=folly.git diff --git a/folly/detail/SlowFingerprint.h b/folly/detail/SlowFingerprint.h index 42cc3a1b..b0721fde 100644 --- a/folly/detail/SlowFingerprint.h +++ b/folly/detail/SlowFingerprint.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,11 @@ * 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 +#include +#include namespace folly { namespace detail { @@ -54,7 +53,7 @@ class SlowFingerprint { 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(*p)); @@ -77,7 +76,7 @@ class SlowFingerprint { void updateLSB(uint64_t val, int bits) { val <<= (64-bits); for (; bits != 0; --bits) { - updateBit(val & (1UL << 63)); + updateBit(val & (1ULL << 63)); val <<= 1; } } @@ -88,6 +87,3 @@ class SlowFingerprint { } // namespace detail } // namespace folly - -#endif /* FOLLY_DETAIL_SLOWFINGERPRINT_H_ */ -