From 30c1f8c1b8ea24b9ca0c6195e6778db6938d0489 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 1 Jul 2014 19:18:03 -0700 Subject: [PATCH] Tabs to spaces --- sol/function_types.hpp | 10 +++++----- tests.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sol/function_types.hpp b/sol/function_types.hpp index 229e29ed..f6b077f5 100644 --- a/sol/function_types.hpp +++ b/sol/function_types.hpp @@ -188,11 +188,11 @@ struct base_function { struct userdata_gc { static int gc(lua_State* L) { for (std::size_t i = 0; i < N; ++i) { - upvalue_t up = stack::get(L, i + 1); - base_function* obj = static_cast(up.value); - std::allocator alloc{}; - alloc.destroy(obj); - alloc.deallocate(obj, 1); + upvalue_t up = stack::get(L, i + 1); + base_function* obj = static_cast(up.value); + std::allocator alloc{}; + alloc.destroy(obj); + alloc.deallocate(obj, 1); } return 0; } diff --git a/tests.cpp b/tests.cpp index 7df28912..4a3b7b9a 100644 --- a/tests.cpp +++ b/tests.cpp @@ -393,7 +393,7 @@ TEST_CASE("tables/functions_variables", "Check if tables and function calls work TEST_CASE("functions/overloaded", "Check if overloaded function resolution templates compile/work") { sol::state lua; - lua.open_libraries(sol::lib::base); + lua.open_libraries(sol::lib::base); lua.set_function("non_overloaded", non_overloaded); REQUIRE_NOTHROW(lua.script("x = non_overloaded(1)\nprint(x)")); @@ -720,7 +720,7 @@ TEST_CASE("userdata/issue-number-thirty-five", "using value types created from l return sqrtf(x*x + y*y + z*z); } - Vec normalized() { + Vec normalized() { float invS = 1 / length(); return {x * invS, y * invS, z * invS}; } @@ -766,7 +766,7 @@ TEST_CASE("userdata/lua-stored-userdata", "ensure userdata values can be stored }; sol::state lua; - lua.open_libraries(sol::lib::base); + lua.open_libraries(sol::lib::base); { sol::constructors> ctor; @@ -778,10 +778,10 @@ TEST_CASE("userdata/lua-stored-userdata", "ensure userdata values can be stored // userdata dies, but still usable in lua! } - REQUIRE_NOTHROW(lua.script("collectgarbage()\n" + REQUIRE_NOTHROW(lua.script("collectgarbage()\n" "v = Vec.new(1, 2, 3)\n" "print(v:length())")); - REQUIRE_NOTHROW(lua.script("v = Vec.new(1, 2, 3)\n" + REQUIRE_NOTHROW(lua.script("v = Vec.new(1, 2, 3)\n" "print(v:normalized():length())" )); }