Parcourir la Source

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

Ole il y a 10 ans
Parent
commit
12cabff8a4
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  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;
 	}