]> git.mxchange.org Git - flightgear.git/commitdiff
Avoid an 'overloaded-virtual' warning.
authorJames Turner <zakalawe@mac.com>
Mon, 17 Sep 2012 23:59:36 +0000 (00:59 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 17 Sep 2012 23:59:36 +0000 (00:59 +0100)
Clang reports an overloaded-virtual in FGGeneric (and it's correct). Rename the overload to avoid both the warning and confusion.

src/Network/generic.cxx
src/Network/generic.hxx

index 21f048c65ff20dd0088e04f8a912e51a983b932f..94a00a0ebc39bcdcaa5453303822e2d8376a029a 100644 (file)
@@ -390,7 +390,7 @@ bool FGGeneric::parse_message_ascii(int length) {
     return true;
 }
 
-bool FGGeneric::parse_message(int length) {
+bool FGGeneric::parse_message_len(int length) {
     if (binary_mode) {
         return parse_message_binary(length);
     } else {
@@ -448,7 +448,7 @@ bool FGGeneric::process() {
             if (!binary_mode) {
                 length = io->readline( buf, FG_MAX_MSG_SIZE );
                 if ( length > 0 ) {
-                    parse_message( length );
+                    parse_message_len( length );
                 } else {
                     SG_LOG( SG_IO, SG_ALERT, "Error reading data." );
                     return false;
@@ -456,7 +456,7 @@ bool FGGeneric::process() {
             } else {
                 length = io->read( buf, binary_record_length );
                 if ( length == binary_record_length ) {
-                    parse_message( length );
+                    parse_message_len( length );
                 } else {
                     SG_LOG( SG_IO, SG_ALERT,
                             "Generic protocol: Received binary "
@@ -468,12 +468,12 @@ bool FGGeneric::process() {
         } else {
             if (!binary_mode) {
                 while ((length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
-                    parse_message( length );
+                    parse_message_len( length );
                 }
             } else {
                 while ((length = io->read( buf, binary_record_length )) 
                           == binary_record_length ) {
-                    parse_message( length );
+                    parse_message_len( length );
                 }
 
                 if ( length > 0 ) {
index d66b84e3879aa783ed1d82144543e7b0c31b5b19..b3020a390273322af90da472026536ec476f0dd9 100644 (file)
@@ -42,7 +42,7 @@ public:
     ~FGGeneric();
 
     bool gen_message();
-    bool parse_message(int length);
+    bool parse_message_len(int length);
 
     // open hailing frequencies
     bool open();