diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-08 18:31:08 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-05-08 18:31:08 +0000 |
commit | 2a708a74d0a2e9a26caeb6bacf9f252102c89326 (patch) | |
tree | ef5ae378fdf4430297e25f052f29fc862f02b9e0 /Game/Code/Classes/UServices.pas | |
parent | 9aa48684216b0dca926fa7e68a1b843dc1a872ce (diff) | |
download | usdx-2a708a74d0a2e9a26caeb6bacf9f252102c89326.tar.gz usdx-2a708a74d0a2e9a26caeb6bacf9f252102c89326.tar.xz usdx-2a708a74d0a2e9a26caeb6bacf9f252102c89326.zip |
added "inherited ..." to all constructors to assure that the base-class constructor is called.
Different to C or Java, the constructor or destructor of the base class (except that of TObject) is not called by default if "inherited ..." is not given (very strange). This is no problem with classes inherited directly from TObject, because the TObject constructor is always called (and sets the values of the fields to 0-values) but i added inherited to these constructors too because the base class may change from TObject to something different and the "inherited" will probably not added in this case and causing problems.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1070 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UServices.pas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Game/Code/Classes/UServices.pas b/Game/Code/Classes/UServices.pas index cb03248e..6a73521d 100644 --- a/Game/Code/Classes/UServices.pas +++ b/Game/Code/Classes/UServices.pas @@ -78,6 +78,8 @@ uses //------------
Constructor TServiceManager.Create;
begin
+ inherited;
+
FirstService := nil;
LastService := nil;
@@ -233,11 +235,9 @@ begin If (Service.isClass) then
//Use Proc of Class
- // FIXME: "function ... of object" does not fit into an integer (2x pointers: object + function-code -> 8byte on x86)
Result := Service.ProcOfClass(wParam, lParam)
Else
//Use normal Proc
- // FIXME: will not work with x64 CPUs, pointers will be 64bit there
Result := Service.Proc(wParam, lParam);
//Restore CurExecuted
|