From 20076aa2b9b34910f7179917448f730575239578 Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 9 Jun 2006 10:53:48 +0000 Subject: [PATCH] - remove obsolete definition - make sure HUD is only initialized once --- src/Cockpit/hud.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index c6f779d1c..7195ad5c2 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -58,16 +58,10 @@ #include
#include -#if defined (__sun) || defined ( __sgi ) -extern "C" { - extern void *memmove(void *, const void *, size_t); -} -#endif - #include "hud.hxx" -static HUD_Properties *HUD; +static HUD_Properties *HUD = 0; static char units[5]; @@ -779,7 +773,8 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) HUDtext->setPointSize(HUD_TextSize); HUD_TextList.setFont( HUDtext ); - HUD = new HUD_Properties; + if (!HUD) + HUD = new HUD_Properties; return 0; // For now. Later we may use this for an error code. } @@ -804,6 +799,8 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ ) input.close(); } + if (!HUD) + HUD = new HUD_Properties; return 0; // For now. Later we may use this for an error code. }