Skip to content

Commit

Permalink
Come on... no one ever used the inheritsFrom* functions?
Browse files Browse the repository at this point in the history
  • Loading branch information
cheat-engine committed Dec 31, 2015
1 parent 3cefe8c commit 7183a5c
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions Cheat Engine/LuaHandler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3312,9 +3312,9 @@ function inheritsFromObject(L: PLua_state): integer; cdecl;
var x: TObject;
begin
result:=0;
if lua_gettop(L)>1 then
if lua_gettop(L)>=1 then
begin
x:=lua_toceuserdata(L, -1);
x:=lua_toceuserdata(L, 1);
lua_pop(L, lua_gettop(l));

if x<>nil then
Expand All @@ -3330,9 +3330,9 @@ function inheritsFromComponent(L: PLua_state): integer; cdecl;
var x: TObject;
begin
result:=0;
if lua_gettop(L)>1 then
if lua_gettop(L)>=1 then
begin
x:=lua_toceuserdata(L, -1);
x:=lua_toceuserdata(L, 1);
lua_pop(L, lua_gettop(l));

if x<>nil then
Expand All @@ -3346,17 +3346,19 @@ function inheritsFromComponent(L: PLua_state): integer; cdecl;

function inheritsFromControl(L: PLua_state): integer; cdecl;
var x: TObject;
r: boolean;
begin
result:=0;
if lua_gettop(L)>1 then
if lua_gettop(L)>=1 then
begin
x:=lua_toceuserdata(L, -1);
x:=lua_toceuserdata(L, 1);
lua_pop(L, lua_gettop(l));

if x<>nil then
begin
result:=1;
lua_pushboolean(l, (x is TControl));
r:=x is TControl;
lua_pushboolean(l, r);
end;

end;
Expand All @@ -3366,9 +3368,9 @@ function inheritsFromWinControl(L: PLua_state): integer; cdecl;
var x: TObject;
begin
result:=0;
if lua_gettop(L)>1 then
if lua_gettop(L)>=1 then
begin
x:=lua_toceuserdata(L, -1);
x:=lua_toceuserdata(L, 1);
lua_pop(L, lua_gettop(l));

if x<>nil then
Expand All @@ -3381,16 +3383,6 @@ function inheritsFromWinControl(L: PLua_state): integer; cdecl;
end;












function createToggleBox(L: Plua_State): integer; cdecl;
var
ToggleBox: TCEToggleBox;
Expand Down

0 comments on commit 7183a5c

Please sign in to comment.