From 8a240d043d4027ccf19c0f05e36bf29c1aa21047 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 19 Jun 1999 15:36:49 +0000 Subject: [PATCH] Fixed a problem with ambiguous constructors in the fgText class. --- Simulator/Cockpit/hud.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Simulator/Cockpit/hud.hxx b/Simulator/Cockpit/hud.hxx index e26245642..cb1c6afc3 100644 --- a/Simulator/Cockpit/hud.hxx +++ b/Simulator/Cockpit/hud.hxx @@ -236,10 +236,17 @@ private: char msg[32]; float x, y; public: + // note to Norman from Curt. You had two constructors here that + // have defaults values for all parameters. So, if a constructor + // is called with no parameters, which is chosen? For the second, + // I've removed the default value for x which fixes the problem. + // However, it might be best to just delete the second redundant + // constructor, and fix the constructor variable ordering + // throughout the rest of the code. fgText( char *c = NULL, float x = 0, float y =0 ) : x(x), y(y) {strncpy(msg,c,32-1);} - fgText( float x = 0, float y = 0, char *c = NULL ) + fgText( float x, float y = 0, char *c = NULL ) : x(x), y(y) {strncpy(msg,c,32-1);} fgText( const fgText & image )