Просмотр исходного кода

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

Ole лет назад: 10
Родитель
Сommit
12cabff8a4
1 измененных файлов с 1 добавлено и 3 удалено
  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;
 	}