]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/transmissionlist.cxx
any wind < 1kt is "calm", not just 0.0
[flightgear.git] / src / ATC / transmissionlist.cxx
index c8a8f5f66cfb16301c1ec815589fb83940641be0..cb24e50ca7aee8fba8e5d1b75e2933e81c577749 100644 (file)
@@ -3,7 +3,7 @@
 // Written by Alexander Kappes, started March 2002.
 // Based on navlist.cxx by Curtis Olson, started April 2000.
 //
-// Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2000  Curtis L. Olson - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -17,7 +17,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -54,7 +54,7 @@ FGTransmissionList::~FGTransmissionList( void ) {
 
 
 // load default.transmissions
-bool FGTransmissionList::init( SGPath path ) {
+bool FGTransmissionList::init( const SGPath& path ) {
     FGTransmission a;
 
     transmissionlist_station.erase( transmissionlist_station.begin(), transmissionlist_station.end() );
@@ -174,7 +174,7 @@ string FGTransmissionList::gen_text(const atc_type &station, const TransCode cod
                        int check = 0;  // If mes gets overflowed the while loop can go infinite
                        while ( strchr(&mes[0], crej) != NULL  ) {      // ie. loop until no more occurances of crej ('@') found
                                pos = strchr( &mes[0], crej );
-                               bcopy(pos, &tag[0], 3);
+                               memmove(&tag[0], pos, 3);
                                tag[3] = '\0';
                                int i;
                                len = 0;
@@ -257,8 +257,7 @@ string FGTransmissionList::gen_text(const atc_type &station, const TransCode cod
                        break;
                }
        }
-       if ( mes != "" ) return mes;
-       else return "No transmission found";
+       return mes[0] ? mes : "No transmission found";
 }