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