diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-06-09 10:58:34 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-06-09 10:58:34 +0800 |
commit | 374a42466ee4e9d0a25ef65f73b84e3c870d6f79 (patch) | |
tree | 7c9e1575cdbf8b011d56f65f16a8dcc2431bc66f /src/include | |
parent | 9f8d9fa81be1c11b50bc5ced608a3bd18a53de21 (diff) | |
download | mrust-374a42466ee4e9d0a25ef65f73b84e3c870d6f79.tar.gz |
Fix use of hard tabs
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/debug.hpp | 12 | ||||
-rw-r--r-- | src/include/synext_decorator.hpp | 22 | ||||
-rw-r--r-- | src/include/synext_macro.hpp | 22 | ||||
-rw-r--r-- | src/include/tagged_union.hpp | 18 |
4 files changed, 37 insertions, 37 deletions
diff --git a/src/include/debug.hpp b/src/include/debug.hpp index 2bbecb39..2f593cfb 100644 --- a/src/include/debug.hpp +++ b/src/include/debug.hpp @@ -42,10 +42,10 @@ class NullSink { public: NullSink() - {} + {} - template<typename T> - const NullSink& operator<<(const T&) const { return *this; } + template<typename T> + const NullSink& operator<<(const T&) const { return *this; } }; class TraceLog @@ -62,9 +62,9 @@ public: struct FmtLambda { ::std::function<void(::std::ostream&)> m_cb; - FmtLambda(::std::function<void(::std::ostream&)> cb): - m_cb(cb) - { } + FmtLambda(::std::function<void(::std::ostream&)> cb): + m_cb(cb) + { } friend ::std::ostream& operator<<(::std::ostream& os, const FmtLambda& x) { x.m_cb(os); return os; diff --git a/src/include/synext_decorator.hpp b/src/include/synext_decorator.hpp index 3374fc88..77b55710 100644 --- a/src/include/synext_decorator.hpp +++ b/src/include/synext_decorator.hpp @@ -63,19 +63,19 @@ extern void Register_Synext_Decorator_Static(DecoratorDef* def); struct DecoratorDef { - DecoratorDef* prev; - ::std::string name; - ::std::unique_ptr<ExpandDecorator> def; - DecoratorDef(::std::string name, ::std::unique_ptr<ExpandDecorator> def): - prev(nullptr), - name(::std::move(name)), - def(::std::move(def)) - { - Register_Synext_Decorator_Static(this); - } + DecoratorDef* prev; + ::std::string name; + ::std::unique_ptr<ExpandDecorator> def; + DecoratorDef(::std::string name, ::std::unique_ptr<ExpandDecorator> def): + prev(nullptr), + name(::std::move(name)), + def(::std::move(def)) + { + Register_Synext_Decorator_Static(this); + } }; -#define STATIC_DECORATOR(ident, _handler_class) static DecoratorDef s_register_##_handler_class ( ident, ::std::unique_ptr<ExpandDecorator>(new _handler_class()) ); +#define STATIC_DECORATOR(ident, _handler_class) static DecoratorDef s_register_##_handler_class ( ident, ::std::unique_ptr<ExpandDecorator>(new _handler_class()) ); #endif diff --git a/src/include/synext_macro.hpp b/src/include/synext_macro.hpp index 0abaf0fe..0359d508 100644 --- a/src/include/synext_macro.hpp +++ b/src/include/synext_macro.hpp @@ -31,19 +31,19 @@ extern void Register_Synext_Macro_Static(MacroDef* def); struct MacroDef { - MacroDef* prev; - ::std::string name; - ::std::unique_ptr<ExpandProcMacro> def; - MacroDef(::std::string name, ::std::unique_ptr<ExpandProcMacro> def) : - prev(nullptr), - name(::std::move(name)), - def(::std::move(def)) - { - Register_Synext_Macro_Static(this); - } + MacroDef* prev; + ::std::string name; + ::std::unique_ptr<ExpandProcMacro> def; + MacroDef(::std::string name, ::std::unique_ptr<ExpandProcMacro> def) : + prev(nullptr), + name(::std::move(name)), + def(::std::move(def)) + { + Register_Synext_Macro_Static(this); + } }; -#define STATIC_MACRO(ident, _handler_class) static MacroDef s_register_##_handler_class(ident, ::std::unique_ptr<ExpandProcMacro>(new _handler_class())); +#define STATIC_MACRO(ident, _handler_class) static MacroDef s_register_##_handler_class(ident, ::std::unique_ptr<ExpandProcMacro>(new _handler_class())); #endif diff --git a/src/include/tagged_union.hpp b/src/include/tagged_union.hpp index fbd42a77..f30cb7f2 100644 --- a/src/include/tagged_union.hpp +++ b/src/include/tagged_union.hpp @@ -13,13 +13,13 @@ #include <string> #define TU_FIRST(a, ...) a -#define TU_EXP1(x) x +#define TU_EXP1(x) x #define TU_EXP(...) __VA_ARGS__ -#define TU_CASE_ITEM(src, mod, var, name) mod auto& name = src.as_##var(); (void)&name; -#define TU_CASE_BODY(class,var, ...) case class::var: { __VA_ARGS__ } break; -#define TU_CASE(mod, class, var, name,src, ...) TU_CASE_BODY(mod,class,var, TU_CASE_ITEM(src,mod,var,name) __VA_ARGS__) -#define TU_CASE2(mod, class, var, n1,s1, n2,s2, ...) TU_CASE_BODY(mod,class,var, TU_CASE_ITEM(s1,mod,var,n1) TU_CASE_ITEM(s2,mod,var,n2) __VA_ARGS__) +#define TU_CASE_ITEM(src, mod, var, name) mod auto& name = src.as_##var(); (void)&name; +#define TU_CASE_BODY(class,var, ...) case class::var: { __VA_ARGS__ } break; +#define TU_CASE(mod, class, var, name,src, ...) TU_CASE_BODY(mod,class,var, TU_CASE_ITEM(src,mod,var,name) __VA_ARGS__) +#define TU_CASE2(mod, class, var, n1,s1, n2,s2, ...) TU_CASE_BODY(mod,class,var, TU_CASE_ITEM(s1,mod,var,n1) TU_CASE_ITEM(s2,mod,var,n2) __VA_ARGS__) // Argument iteration @@ -31,7 +31,7 @@ #define TU_DISP5(n, a1,a2,a3, b1,b2 ) TU_DISP3(n, a1,a2,a3) TU_DISP2(n, b1,b2) #define TU_DISP6(n, a1,a2,a3, b1,b2,b3) TU_DISP3(n, a1,a2,a3) TU_DISP3(n, b1,b2,b3) #define TU_DISP7(n, a1,a2,a3,a4, b1,b2,b3 ) TU_DISP4(n, a1,a2,a3,a4) TU_DISP3(n, b1,b2,b3) -#define TU_DISP8(n, a1,a2,a3,a4, b1,b2,b3,b4) TU_DISP4(n, a1,a2,a3,a4) TU_DISP4(n, b1,b2,b3,b4) +#define TU_DISP8(n, a1,a2,a3,a4, b1,b2,b3,b4) TU_DISP4(n, a1,a2,a3,a4) TU_DISP4(n, b1,b2,b3,b4) #define TU_DISP9(n, a1,a2,a3,a4, b1,b2,b3,b4, c1 ) TU_DISP4(n, a1,a2,a3,a4) TU_DISP3(n, b1,b2,b3 ) TU_DISP2(n, b4,c1) #define TU_DISP10(n, a1,a2,a3,a4, b1,b2,b3,b4, c1,c2 ) TU_DISP4(n, a1,a2,a3,a4) TU_DISP4(n, b1,b2,b3,b4) TU_DISP2(n, c1,c2) #define TU_DISP11(n, a1,a2,a3,a4, b1,b2,b3,b4, c1,c2,c3 ) TU_DISP4(n, a1,a2,a3,a4) TU_DISP4(n, b1,b2,b3,b4) TU_DISP3(n, c1,c2,c3) @@ -48,7 +48,7 @@ #define TU_DISPO4(n, v, v2, v3, v4) n(v) n(v2) n(v3) n(v4) #define TU_DISPO5(n, a1,a2,a3, b1,b2 ) TU_DISPO3(n, a1,a2,a3) TU_DISPO2(n, b1,b2) #define TU_DISPO6(n, a1,a2,a3, b1,b2,b3) TU_DISPO3(n, a1,a2,a3) TU_DISPO3(n, b1,b2,b3) -#define TU_DISPO7(n, a1,a2,a3,a4, b1,b2,b3 ) TU_DISPO4(n, a1,a2,a3,a4) TU_DISPO3(n, b1,b2,b3) +#define TU_DISPO7(n, a1,a2,a3,a4, b1,b2,b3 ) TU_DISPO4(n, a1,a2,a3,a4) TU_DISPO3(n, b1,b2,b3) #define TU_DISPO8(n, a1,a2,a3,a4, b1,b2,b3,b4) TU_DISPO4(n, a1,a2,a3,a4) TU_DISPO4(n, b1,b2,b3,b4) #define TU_DISPO9(n, a1,a2,a3,a4, b1,b2,b3,b4, c1) TU_DISPO4(n, a1,a2,a3,a4) TU_DISPO3(n, b1,b2,b3) TU_DISPO2(n, b4,c1) #define TU_DISPO10(n, a1,a2,a3,a4, b1,b2,b3,b4, c1,c2) TU_DISPO4(n, a1,a2,a3,a4) TU_DISPO4(n, b1,b2,b3,b4) TU_DISPO2(n, c1,c2) @@ -61,8 +61,8 @@ #define TU_DISPA(n, a) n a #define TU_DISPA1(n, a, _1) TU_DISPA(n, (TU_EXP a, TU_EXP _1)) -#define TU_DISPA2(n, a, _1, _2) TU_DISPA(n, (TU_EXP a, TU_EXP _1)) TU_DISPA(n, (TU_EXP a, TU_EXP _2)) -#define TU_DISPA3(n, a, _1, _2, _3) TU_DISPA(n, (TU_EXP a, TU_EXP _1)) TU_DISPA(n, (TU_EXP a, TU_EXP _2)) TU_DISPA(n, (TU_EXP a, TU_EXP _3)) +#define TU_DISPA2(n, a, _1, _2) TU_DISPA(n, (TU_EXP a, TU_EXP _1)) TU_DISPA(n, (TU_EXP a, TU_EXP _2)) +#define TU_DISPA3(n, a, _1, _2, _3) TU_DISPA(n, (TU_EXP a, TU_EXP _1)) TU_DISPA(n, (TU_EXP a, TU_EXP _2)) TU_DISPA(n, (TU_EXP a, TU_EXP _3)) #define TU_DISPA4(n, a, a1,a2, b1,b2) TU_DISPA2(n,a, a1,a2) TU_DISPA2(n,a, b1,b2) #define TU_DISPA5(n, a, a1,a2,a3, b1,b2) TU_DISPA3(n,a, a1,a2,a3) TU_DISPA2(n,a, b1,b2) #define TU_DISPA6(n, a, a1,a2,a3, b1,b2,b3) TU_DISPA3(n,a, a1,a2,a3) TU_DISPA3(n,a, b1,b2,b3) |