Explorar el Código

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

Ole hace 10 años
padre
commit
12cabff8a4
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  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;
 	}