Commit 34592733 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Cut glog include in folly/Range.h

Summary: [Folly] Cut glog include in `folly/Range.h`.

Reviewed By: meyering

Differential Revision: D14402324

fbshipit-source-id: ed37939d69b2de4016483e7a2564d73892a64b3b
parent 3e23fe15
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <utility> #include <utility>
#include <double-conversion/double-conversion.h> // V8 JavaScript implementation #include <double-conversion/double-conversion.h> // V8 JavaScript implementation
#include <glog/logging.h>
#include <folly/Demangle.h> #include <folly/Demangle.h>
#include <folly/Expected.h> #include <folly/Expected.h>
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <cassert> #include <cassert>
#include <limits> #include <limits>
#include <glog/logging.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/Range.h> #include <folly/Range.h>
#include <folly/ScopeGuard.h> #include <folly/ScopeGuard.h>
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <iosfwd> #include <iosfwd>
#include <string> #include <string>
#include <glog/logging.h>
#include <folly/IPAddress.h> #include <folly/IPAddress.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/Range.h> #include <folly/Range.h>
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <string> #include <string>
#include <glog/logging.h>
#include <folly/Function.h> #include <folly/Function.h>
#include <folly/Optional.h> #include <folly/Optional.h>
#include <folly/Range.h> #include <folly/Range.h>
......
...@@ -17,10 +17,9 @@ ...@@ -17,10 +17,9 @@
#pragma once #pragma once
#include <algorithm> #include <algorithm>
#include <cassert>
#include <string> #include <string>
#include <glog/logging.h>
#include <folly/Likely.h> #include <folly/Likely.h>
namespace folly { namespace folly {
...@@ -56,7 +55,7 @@ class StringPieceLite { ...@@ -56,7 +55,7 @@ class StringPieceLite {
return size() == 0; return size() == 0;
} }
const char& operator[](size_t i) const { const char& operator[](size_t i) const {
DCHECK_GT(size(), i); assert(size() > i);
return b_[i]; return b_[i];
} }
template <typename Range> template <typename Range>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <folly/detail/RangeSse42.h> #include <folly/detail/RangeSse42.h>
#include <glog/logging.h> #include <cassert>
#include <folly/Portability.h> #include <folly/Portability.h>
...@@ -73,9 +73,9 @@ static inline size_t nextAlignedIndex(const char* arr) { ...@@ -73,9 +73,9 @@ static inline size_t nextAlignedIndex(const char* arr) {
size_t qfind_first_byte_of_needles16( size_t qfind_first_byte_of_needles16(
const StringPieceLite haystack, const StringPieceLite haystack,
const StringPieceLite needles) { const StringPieceLite needles) {
DCHECK_GT(haystack.size(), 0u); assert(haystack.size() > 0u);
DCHECK_GT(needles.size(), 0u); assert(needles.size() > 0u);
DCHECK_LE(needles.size(), 16u); assert(needles.size() <= 16u);
if ((needles.size() <= 2 && haystack.size() >= 256) || if ((needles.size() <= 2 && haystack.size() >= 256) ||
// must bail if we can't even SSE-load a single segment of haystack // must bail if we can't even SSE-load a single segment of haystack
(haystack.size() < 16 && (haystack.size() < 16 &&
...@@ -119,8 +119,8 @@ size_t scanHaystackBlock( ...@@ -119,8 +119,8 @@ size_t scanHaystackBlock(
const StringPieceLite haystack, const StringPieceLite haystack,
const StringPieceLite needles, const StringPieceLite needles,
uint64_t blockStartIdx) { uint64_t blockStartIdx) {
DCHECK_GT(needles.size(), 16u); // should handled by *needles16() method assert(needles.size() > 16u); // should handled by *needles16() method
DCHECK( assert(
blockStartIdx + 16 <= haystack.size() || blockStartIdx + 16 <= haystack.size() ||
(page_for(haystack.data() + blockStartIdx) == (page_for(haystack.data() + blockStartIdx) ==
page_for(haystack.data() + blockStartIdx + 15))); page_for(haystack.data() + blockStartIdx + 15)));
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
// specializations. // specializations.
#include <folly/experimental/crypto/detail/LtHashInternal.h> #include <folly/experimental/crypto/detail/LtHashInternal.h>
#include <glog/logging.h>
#ifdef __AVX2__ #ifdef __AVX2__
#include <immintrin.h> #include <immintrin.h>
#include <sodium.h> #include <sodium.h>
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
// specializations. // specializations.
#include <folly/experimental/crypto/detail/LtHashInternal.h> #include <folly/experimental/crypto/detail/LtHashInternal.h>
#include <glog/logging.h>
#ifdef __SSE2__ #ifdef __SSE2__
#include <emmintrin.h> #include <emmintrin.h>
#include <sodium.h> #include <sodium.h>
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
// specializations. // specializations.
#include <folly/experimental/crypto/detail/LtHashInternal.h> #include <folly/experimental/crypto/detail/LtHashInternal.h>
#include <glog/logging.h>
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/lang/Bits.h> #include <folly/lang/Bits.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <random> #include <random>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <glog/logging.h>
#include <folly/Random.h> #include <folly/Random.h>
#include <folly/experimental/FunctionScheduler.h> #include <folly/experimental/FunctionScheduler.h>
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include <glog/logging.h>
#include <folly/Range.h> #include <folly/Range.h>
#include <folly/Utility.h> #include <folly/Utility.h>
......
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