From: James Turner Date: Mon, 17 Sep 2012 23:59:36 +0000 (+0100) Subject: Avoid an 'overloaded-virtual' warning. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=39307d335c3976fc459eff5cda401ef71332b8fc;p=flightgear.git Avoid an 'overloaded-virtual' warning. Clang reports an overloaded-virtual in FGGeneric (and it's correct). Rename the overload to avoid both the warning and confusion. --- diff --git a/src/Network/generic.cxx b/src/Network/generic.cxx index 21f048c65..94a00a0eb 100644 --- a/src/Network/generic.cxx +++ b/src/Network/generic.cxx @@ -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 ) { diff --git a/src/Network/generic.hxx b/src/Network/generic.hxx index d66b84e38..b3020a390 100644 --- a/src/Network/generic.hxx +++ b/src/Network/generic.hxx @@ -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();