]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed a problem with ambiguous constructors in the fgText class.
authorcurt <curt>
Sat, 19 Jun 1999 15:36:49 +0000 (15:36 +0000)
committercurt <curt>
Sat, 19 Jun 1999 15:36:49 +0000 (15:36 +0000)
Simulator/Cockpit/hud.hxx

index e262456424cce507ddbf7f7058b478cca6d0ed80..cb1c6afc321fd1929e8a7dc7019f5c4d6e00b6e7 100644 (file)
@@ -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 )