# HG changeset patch # User koda # Date 1277933238 -7200 # Node ID 715a43602da882d5dedc442a13f60860921d2015 # Parent a8aa06bae8958babf3e97a7cf7eb1394175f8322 sheepluva's inline patch, fix a crash in overlay diff -r a8aa06bae895 -r 715a43602da8 hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Wed Jun 30 22:42:55 2010 +0200 +++ b/hedgewars/uFloat.pas Wed Jun 30 23:27:18 2010 +0200 @@ -22,6 +22,7 @@ interface {$IFDEF FPC} +{$INLINE ON} {$IFDEF ENDIAN_LITTLE} type hwFloat = record isNegative: boolean; @@ -38,14 +39,14 @@ end; {$ENDIF} -function int2hwFloat (const i: LongInt) : hwFloat; +function int2hwFloat (const i: LongInt) : hwFloat; inline; -operator + (const z1, z2: hwFloat) z : hwFloat; -operator - (const z1, z2: hwFloat) z : hwFloat; +operator + (const z1, z2: hwFloat) z : hwFloat; inline; +operator - (const z1, z2: hwFloat) z : hwFloat; inline; operator - (const z1: hwFloat) z : hwFloat; operator * (const z1, z2: hwFloat) z : hwFloat; -operator * (const z1: hwFloat; const z2: LongInt) z : hwFloat; +operator * (const z1: hwFloat; const z2: LongInt) z : hwFloat; inline; operator / (const z1: hwFloat; z2: hwFloat) z : hwFloat; operator / (const z1: hwFloat; const z2: LongInt) z : hwFloat; @@ -55,8 +56,8 @@ function cstr(const z: hwFloat): shortstring; function hwRound(const t: hwFloat): LongInt; function hwAbs(const t: hwFloat): hwFloat; -function hwSqr(const t: hwFloat): hwFloat; -function hwSqrt(const t: hwFloat): hwFloat; +function hwSqr(const t: hwFloat): hwFloat; inline; +function hwSqrt(const t: hwFloat): hwFloat; inline; function Distance(const dx, dy: hwFloat): hwFloat; function DistanceI(const dx, dy: LongInt): hwFloat; function AngleSin(const Angle: Longword): hwFloat; @@ -149,6 +150,7 @@ implementation uses uMisc; + {$IFDEF FPC} function int2hwFloat (const i: LongInt) : hwFloat; diff -r a8aa06bae895 -r 715a43602da8 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Wed Jun 30 22:42:55 2010 +0200 +++ b/hedgewars/uMisc.pas Wed Jun 30 23:27:18 2010 +0200 @@ -17,6 +17,7 @@ *) {$INCLUDE "options.inc"} +{$INLINE ON} unit uMisc; interface @@ -147,7 +148,7 @@ function Min(a, b: LongInt): LongInt; function Max(a, b: LongInt): LongInt; procedure OutError(Msg: shortstring; isFatalError: boolean); -procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); +procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); inline; procedure SDLTry(Assert: boolean; isFatal: boolean); function IntToStr(n: LongInt): shortstring; function FloatToStr(n: hwFloat): shortstring; @@ -163,7 +164,7 @@ function NewTexture(width, height: Longword; buf: Pointer): PTexture; function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture; procedure FreeTexture(tex: PTexture); -function toPowerOf2(i: Longword): Longword; +function toPowerOf2(i: Longword): Longword; inline; function DecodeBase64(s: shortstring): shortstring; function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface; function endian(independent: LongWord): LongWord; diff -r a8aa06bae895 -r 715a43602da8 project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Wed Jun 30 22:42:55 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Wed Jun 30 23:27:18 2010 +0200 @@ -148,6 +148,7 @@ -(void) viewDidUnload { self.writeChatTextField = nil; + [popoverController dismissPopoverAnimated:NO]; self.popoverController = nil; self.popupMenu = nil; self.spinningWheel = nil;