Commit a8370f02 authored by Marcelo Juchem's avatar Marcelo Juchem Committed by Jordan DeLong

Clang complains about errors in folly String-inl.h and FBString.h (P1825995)

Summary: fixing clang errors (used clang 3.1)

Test Plan: doh

Reviewed By: tudorb@fb.com

FB internal diff: D622593
parent 99f7266b
...@@ -1269,7 +1269,7 @@ public: ...@@ -1269,7 +1269,7 @@ public:
// std::less_equal, which is guaranteed to offer a total order // std::less_equal, which is guaranteed to offer a total order
// over pointers. See discussion at http://goo.gl/Cy2ya for more // over pointers. See discussion at http://goo.gl/Cy2ya for more
// info. // info.
static const std::less_equal<const value_type*> le; std::less_equal<const value_type*> le;
if (UNLIKELY(le(oldData, s) && !le(oldData + oldSize, s))) { if (UNLIKELY(le(oldData, s) && !le(oldData + oldSize, s))) {
assert(le(s + n, oldData + oldSize)); assert(le(s + n, oldData + oldSize));
const size_type offset = s - oldData; const size_type offset = s - oldData;
......
...@@ -278,7 +278,7 @@ template<class Delim, class String, class OutputType> ...@@ -278,7 +278,7 @@ template<class Delim, class String, class OutputType>
void split(const Delim& delimiter, void split(const Delim& delimiter,
const String& input, const String& input,
fbvector<OutputType>& out, fbvector<OutputType>& out,
bool ignoreEmpty = false) { bool ignoreEmpty) {
detail::internalSplit<OutputType>( detail::internalSplit<OutputType>(
detail::prepareDelim(delimiter), detail::prepareDelim(delimiter),
StringPiece(input), StringPiece(input),
...@@ -451,7 +451,7 @@ void humanify(const String1& input, String2& output) { ...@@ -451,7 +451,7 @@ void humanify(const String1& input, String2& output) {
template<class InputString, class OutputString> template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output, bool hexlify(const InputString& input, OutputString& output,
bool append_output=false) { bool append_output) {
if (!append_output) output.clear(); if (!append_output) output.clear();
static char hexValues[] = "0123456789abcdef"; static char hexValues[] = "0123456789abcdef";
......
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