diff options
| author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) | 
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) | 
| commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
| tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Sluift/Lua/FunctionRegistration.h | |
| parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
| download | swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2 | |
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Sluift/Lua/FunctionRegistration.h')
| -rw-r--r-- | Sluift/Lua/FunctionRegistration.h | 44 | 
1 files changed, 22 insertions, 22 deletions
| diff --git a/Sluift/Lua/FunctionRegistration.h b/Sluift/Lua/FunctionRegistration.h index 3f0afbb..8e1410d 100644 --- a/Sluift/Lua/FunctionRegistration.h +++ b/Sluift/Lua/FunctionRegistration.h @@ -16,31 +16,31 @@  #include <Sluift/Lua/FunctionRegistry.h>  namespace Swift { -	namespace Lua { -		class FunctionRegistration { -			public: -				FunctionRegistration( -						const std::string& name, lua_CFunction function, const std::string& type,  -						const std::string& helpDescription, const std::string& helpParameters, const std::string& helpOptions); -				~FunctionRegistration(); -		}; -	} +    namespace Lua { +        class FunctionRegistration { +            public: +                FunctionRegistration( +                        const std::string& name, lua_CFunction function, const std::string& type, +                        const std::string& helpDescription, const std::string& helpParameters, const std::string& helpOptions); +                ~FunctionRegistration(); +        }; +    }  }  #define SLUIFT_LUA_FUNCTION_WITH_HELP(TYPE, NAME, HELP_DESCRIPTION, HELP_PARAMETERS, HELP_OPTIONS) \ -	static int TYPE##_##NAME(lua_State* L); \ -	static int TYPE##_##NAME##_wrapper(lua_State* L); \ -	static ::Swift::Lua::FunctionRegistration TYPE##_##NAME##_registration( #NAME , TYPE##_##NAME##_wrapper, #TYPE, HELP_DESCRIPTION, HELP_PARAMETERS, HELP_OPTIONS); \ -	static int TYPE##_##NAME##_wrapper(lua_State* L) { \ -		try { \ -			return TYPE ## _ ## NAME (L); \ -		} \ -		catch (const std::exception& e) { \ -			return luaL_error(L, e.what()); \ -		} \ -	} \ -	static int TYPE ## _ ## NAME (lua_State* L) +    static int TYPE##_##NAME(lua_State* L); \ +    static int TYPE##_##NAME##_wrapper(lua_State* L); \ +    static ::Swift::Lua::FunctionRegistration TYPE##_##NAME##_registration( #NAME , TYPE##_##NAME##_wrapper, #TYPE, HELP_DESCRIPTION, HELP_PARAMETERS, HELP_OPTIONS); \ +    static int TYPE##_##NAME##_wrapper(lua_State* L) { \ +        try { \ +            return TYPE ## _ ## NAME (L); \ +        } \ +        catch (const std::exception& e) { \ +            return luaL_error(L, e.what()); \ +        } \ +    } \ +    static int TYPE ## _ ## NAME (lua_State* L)  #define SLUIFT_LUA_FUNCTION(TYPE, NAME) \ -	SLUIFT_LUA_FUNCTION_WITH_HELP(TYPE, NAME, "", "", "") +    SLUIFT_LUA_FUNCTION_WITH_HELP(TYPE, NAME, "", "", "") | 
 Swift
 Swift