clang-format

This commit is contained in:
Jesse Beder
2014-03-23 20:08:54 -05:00
parent d508a7cb0d
commit 06bf012d81
22 changed files with 584 additions and 690 deletions

View File

@@ -30,7 +30,7 @@
// #pragma message( "Defining YAML_CPP_API for DLL import" )
#define YAML_CPP_API __declspec(dllimport)
#endif // yaml_cpp_EXPORTS
#else // YAML_CPP_DLL
#else // YAML_CPP_DLL
#define YAML_CPP_API
#endif // YAML_CPP_DLL

View File

@@ -47,11 +47,7 @@ class EmitFromEvents : public EventHandler {
Emitter& m_emitter;
struct State {
enum value {
WaitingForSequenceEntry,
WaitingForKey,
WaitingForValue
};
enum value { WaitingForSequenceEntry, WaitingForKey, WaitingForValue };
};
std::stack<State::value> m_stateStack;
};

View File

@@ -9,15 +9,7 @@
namespace YAML {
struct EmitterNodeType {
enum value {
None,
Property,
Scalar,
FlowSeq,
BlockSeq,
FlowMap,
BlockMap
};
enum value { None, Property, Scalar, FlowSeq, BlockSeq, FlowMap, BlockMap };
};
}

View File

@@ -85,11 +85,7 @@ inline _Anchor Anchor(const std::string content) { return _Anchor(content); }
struct _Tag {
struct Type {
enum value {
Verbatim,
PrimaryHandle,
NamedHandle
};
enum value { Verbatim, PrimaryHandle, NamedHandle };
};
explicit _Tag(const std::string& prefix_, const std::string& content_,

View File

@@ -10,103 +10,71 @@
namespace YAML {
template <typename>
struct is_numeric {
enum {
value = false
};
enum { value = false };
};
template <>
struct is_numeric<char> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<unsigned char> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<int> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<unsigned int> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<long int> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<unsigned long int> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<short int> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<unsigned short int> {
enum {
value = true
};
enum { value = true };
};
#if defined(_MSC_VER) && (_MSC_VER < 1310)
template <>
struct is_numeric<__int64> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<unsigned __int64> {
enum {
value = true
};
enum { value = true };
};
#else
template <>
struct is_numeric<long long> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<unsigned long long> {
enum {
value = true
};
enum { value = true };
};
#endif
template <>
struct is_numeric<float> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<double> {
enum {
value = true
};
enum { value = true };
};
template <>
struct is_numeric<long double> {
enum {
value = true
};
enum { value = true };
};
template <bool, class T = void>