Clang complains about errors in folly String-inl.h and FBString.h (P1825995)
authorMarcelo Juchem <marcelo@fb.com>
Tue, 6 Nov 2012 01:32:28 +0000 (17:32 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:43:18 +0000 (14:43 -0800)
Summary: fixing clang errors (used clang 3.1)

Test Plan: doh

Reviewed By: tudorb@fb.com

FB internal diff: D622593

folly/FBString.h
folly/String-inl.h

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