Run clang-format.

This commit is contained in:
Jesse Beder
2016-10-12 00:00:39 -05:00
parent 086fec5c35
commit b5b03bb9ad
10 changed files with 35 additions and 43 deletions

View File

@@ -89,7 +89,7 @@ const char* const BAD_FILE = "bad file";
template <typename T>
inline const std::string KEY_NOT_FOUND_WITH_KEY(
const T&, typename disable_if<is_numeric<T> >::type* = 0) {
const T&, typename disable_if<is_numeric<T>>::type* = 0) {
return KEY_NOT_FOUND;
}
@@ -101,7 +101,7 @@ inline const std::string KEY_NOT_FOUND_WITH_KEY(const std::string& key) {
template <typename T>
inline const std::string KEY_NOT_FOUND_WITH_KEY(
const T& key, typename enable_if<is_numeric<T> >::type* = 0) {
const T& key, typename enable_if<is_numeric<T>>::type* = 0) {
std::stringstream stream;
stream << KEY_NOT_FOUND << ": " << key;
return stream.str();

View File

@@ -163,7 +163,7 @@ struct convert<bool> {
// std::map
template <typename K, typename V>
struct convert<std::map<K, V> > {
struct convert<std::map<K, V>> {
static Node encode(const std::map<K, V>& rhs) {
Node node(NodeType::Map);
for (typename std::map<K, V>::const_iterator it = rhs.begin();
@@ -190,7 +190,7 @@ struct convert<std::map<K, V> > {
// std::vector
template <typename T>
struct convert<std::vector<T> > {
struct convert<std::vector<T>> {
static Node encode(const std::vector<T>& rhs) {
Node node(NodeType::Sequence);
for (typename std::vector<T>::const_iterator it = rhs.begin();
@@ -217,7 +217,7 @@ struct convert<std::vector<T> > {
// std::list
template <typename T>
struct convert<std::list<T> > {
struct convert<std::list<T>> {
static Node encode(const std::list<T>& rhs) {
Node node(NodeType::Sequence);
for (typename std::list<T>::const_iterator it = rhs.begin();
@@ -269,8 +269,7 @@ struct convert<std::array<T, N>> {
return true;
}
private:
private:
static bool isNodeValid(const Node& node) {
return node.IsSequence() && node.size() == N;
}
@@ -278,7 +277,7 @@ private:
// std::pair
template <typename T, typename U>
struct convert<std::pair<T, U> > {
struct convert<std::pair<T, U>> {
static Node encode(const std::pair<T, U>& rhs) {
Node node(NodeType::Sequence);
node.push_back(rhs.first);

View File

@@ -55,7 +55,7 @@ template <typename V>
class node_iterator_base
: public std::iterator<std::forward_iterator_tag, node_iterator_value<V>,
std::ptrdiff_t, node_iterator_value<V>*,
node_iterator_value<V> > {
node_iterator_value<V>> {
private:
struct enabler {};

View File

@@ -27,6 +27,6 @@ YAML_CPP_API std::ostream& operator<<(std::ostream& out, const Node& node);
/** Converts the node to a YAML string. */
YAML_CPP_API std::string Dump(const Node& node);
} // namespace YAML
} // namespace YAML
#endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66