ソースを参照

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

Ole 10 年 前
コミット
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;
 	}