From 25c466a152e816f1c0e0ddb7a7299e78d7f821e2 Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Sun, 29 Mar 2015 21:27:20 -0500 Subject: [PATCH] Run clang-format --- include/yaml-cpp/node/convert.h | 2 +- include/yaml-cpp/ostream_wrapper.h | 2 +- src/convert.cpp | 4 ++-- src/stream.cpp | 2 +- src/token.h | 9 ++++----- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index dd74514..cbd3189 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -64,7 +64,7 @@ struct convert { template struct convert { - static Node encode(const char (&rhs)[N]) { return Node(rhs); } + static Node encode(const char(&rhs)[N]) { return Node(rhs); } }; template <> diff --git a/include/yaml-cpp/ostream_wrapper.h b/include/yaml-cpp/ostream_wrapper.h index 1f0a080..09d45f3 100644 --- a/include/yaml-cpp/ostream_wrapper.h +++ b/include/yaml-cpp/ostream_wrapper.h @@ -52,7 +52,7 @@ class YAML_CPP_API ostream_wrapper { template inline ostream_wrapper& operator<<(ostream_wrapper& stream, - const char (&str)[N]) { + const char(&str)[N]) { stream.write(str, N - 1); return stream; } diff --git a/src/convert.cpp b/src/convert.cpp index da3bc2f..ec05b77 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -52,8 +52,8 @@ bool convert::decode(const Node& node, bool& rhs) { static const struct { std::string truename, falsename; } names[] = { - {"y", "n"}, {"yes", "no"}, {"true", "false"}, {"on", "off"}, - }; + {"y", "n"}, {"yes", "no"}, {"true", "false"}, {"on", "off"}, + }; if (!IsFlexibleCase(node.Scalar())) return false; diff --git a/src/stream.cpp b/src/stream.cpp index 0f4e899..3b013cf 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -7,7 +7,7 @@ #endif #define S_ARRAY_SIZE(A) (sizeof(A) / sizeof(*(A))) -#define S_ARRAY_END(A) ((A)+S_ARRAY_SIZE(A)) +#define S_ARRAY_END(A) ((A) + S_ARRAY_SIZE(A)) #define CP_REPLACEMENT_CHARACTER (0xFFFD) diff --git a/src/token.h b/src/token.h index 6d3433e..ad0b7d0 100644 --- a/src/token.h +++ b/src/token.h @@ -14,11 +14,10 @@ namespace YAML { const std::string TokenNames[] = { - "DIRECTIVE", "DOC_START", "DOC_END", "BLOCK_SEQ_START", - "BLOCK_MAP_START", "BLOCK_SEQ_END", "BLOCK_MAP_END", "BLOCK_ENTRY", - "FLOW_SEQ_START", "FLOW_MAP_START", "FLOW_SEQ_END", "FLOW_MAP_END", - "FLOW_MAP_COMPACT", "FLOW_ENTRY", "KEY", "VALUE", - "ANCHOR", "ALIAS", "TAG", "SCALAR"}; + "DIRECTIVE", "DOC_START", "DOC_END", "BLOCK_SEQ_START", "BLOCK_MAP_START", + "BLOCK_SEQ_END", "BLOCK_MAP_END", "BLOCK_ENTRY", "FLOW_SEQ_START", + "FLOW_MAP_START", "FLOW_SEQ_END", "FLOW_MAP_END", "FLOW_MAP_COMPACT", + "FLOW_ENTRY", "KEY", "VALUE", "ANCHOR", "ALIAS", "TAG", "SCALAR"}; struct Token { // enums