Bläddra i källkod

Destructor for user types does not need to check for light userdata anymore

Ole 10 år sedan
förälder
incheckning
12cabff8a4
1 ändrade filer med 1 tillägg och 3 borttagningar
  1. 1 3
      lib/luwra/usertypes.hpp

+ 1 - 3
lib/luwra/usertypes.hpp

@@ -89,9 +89,7 @@ namespace internal {
 	int destruct_user_type(State* state) {
 		using T = StripUserType<U>;
 
-		if (!lua_islightuserdata(state, 1))
-			read<T&>(state, 1).~T();
-
+		read<T&>(state, 1).~T();
 		return 0;
 	}