X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FString-inl.h;h=f6b5ba993dffbba4d2cc318db4c269f314a0833d;hb=8bfce3ed35f7597ce59278a845e9be6d75609a41;hp=cfcbd00a5486ef84fedcbcdb83cc8344556b0607;hpb=ff17894be919173b4bbaf5d9f535b62f92806ebf;p=folly.git diff --git a/folly/String-inl.h b/folly/String-inl.h index cfcbd00a..f6b5ba99 100644 --- a/folly/String-inl.h +++ b/folly/String-inl.h @@ -355,7 +355,7 @@ bool splitFixed( return false; } -} +} // namespace detail ////////////////////////////////////////////////////////////////////// @@ -507,14 +507,21 @@ void backslashify( if (hex_style) { hex_append = true; } else { - if (c == '\r') output += 'r'; - else if (c == '\n') output += 'n'; - else if (c == '\t') output += 't'; - else if (c == '\a') output += 'a'; - else if (c == '\b') output += 'b'; - else if (c == '\0') output += '0'; - else if (c == '\\') output += '\\'; - else { + if (c == '\r') { + output += 'r'; + } else if (c == '\n') { + output += 'n'; + } else if (c == '\t') { + output += 't'; + } else if (c == '\a') { + output += 'a'; + } else if (c == '\b') { + output += 'b'; + } else if (c == '\0') { + output += '0'; + } else if (c == '\\') { + output += '\\'; + } else { hex_append = true; } } @@ -576,7 +583,9 @@ void humanify(const String1& input, String2& output) { template bool hexlify(const InputString& input, OutputString& output, bool append_output) { - if (!append_output) output.clear(); + if (!append_output) { + output.clear(); + } static char hexValues[] = "0123456789abcdef"; auto j = output.size();