/*
- * Copyright 2016 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.
auto index =
_mm_cmpestri(arr2, int(needles.size()), arr1, int(haystack.size()), 0);
if (index < 16) {
- return index;
+ return size_t(index);
}
// Now, we can do aligned loads hereafter...
// This load is safe because needles.size() >= 16
auto arr2 = _mm_loadu_si128(
reinterpret_cast<const __m128i*>(needles.data()));
- size_t b =
+ auto b =
_mm_cmpestri(arr2, 16, arr1, int(haystack.size() - blockStartIdx), 0);
size_t j = nextAlignedIndex(needles.data());
arr1,
int(haystack.size() - blockStartIdx),
0);
- b = std::min<size_t>(index, b);
+ b = std::min(index, b);
}
if (b < 16) {