]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a problem where older IRIX compilers needed a typecast for certain opperations
authorehofman <ehofman>
Thu, 16 Oct 2003 14:14:03 +0000 (14:14 +0000)
committerehofman <ehofman>
Thu, 16 Oct 2003 14:14:03 +0000 (14:14 +0000)
12 files changed:
src/ATC/AILocalTraffic.cxx
src/ATC/ATCDialog.cxx
src/ATC/ATCmgr.cxx
src/ATC/atis.cxx
src/Airports/runways.cxx
src/Instrumentation/adf.cxx
src/MultiPlayer/multiplayrxmgr.cxx
src/Network/atlas.cxx
src/Network/garmin.cxx
src/Network/httpd.cxx
src/Network/nmea.cxx
src/Systems/electrical.cxx

index 8d58ee35f41d2ba710055e636cf73eb6c138c855..f9a5669d544bc2369c556bde3b3152367e54e30e 100644 (file)
@@ -168,7 +168,7 @@ bool FGAILocalTraffic::Init(string ICAO, OperatingState initialState, PatternLeg
        AirportATC a;
        if(ATC->GetAirportATCDetails(airportID, &a)) {
                if(a.tower_freq) {      // Has a tower
-                       tower = (FGTower*)ATC->GetATCPointer((string)airportID, TOWER); // Maybe need some error checking here
+                       tower = (FGTower*)ATC->GetATCPointer(airportID, TOWER); // Maybe need some error checking here
                        if(tower == NULL) {
                                // Something has gone wrong - abort or carry on with un-towered operation?
                                return(false);
index c6fcb1f4f2b134d8389c1b35c82d0a0009cf8275..22e886f2eaed373f8cee392428ddb1ffd295bc31 100644 (file)
@@ -18,6 +18,8 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+#include <simgear/compiler.h>
+
 #include <simgear/structure/commands.hxx>
 
 #include <Main/globals.hxx>
@@ -337,7 +339,7 @@ void FGATCDialog::DoDialog() {
                                string dum;
                                sprintf( buf, "%i", kk+1 );
                                buf[1] = '\0';
-                               dum = (string)(buf);
+                               dum = buf;
                                mentry[kk] = dum + ". " + current->menuentry;
                                optList[kk] = new char[strlen(mentry[kk].c_str()) + 1];
                                strcpy(optList[kk], mentry[kk].c_str());
@@ -523,7 +525,8 @@ void FGATCDialog::FreqDisplay(string ident) {
                                if((*itr).ident == ident) {
                                        if((*itr).type != INVALID) {
                                                ostr << (*itr).type;
-                                               freqs[n] = ostr.str() + "     -     ";
+                                               freqs[n] = ostr.str();
+                                                freqs[n].append("     -     ");
                                                sprintf(buf, "%.2f", ((*itr).freq / 100.0));    // Convert from KHz to MHz
                                                // Hack alert!
                                                if(buf[5] == '3') buf[5] = '2';
index acdf63d1416526dae5495132e952946b455a7982..4c8c87ce5acd7cad973f10bf579ba09243d1aff9 100644 (file)
@@ -270,13 +270,13 @@ bool FGATCMgr::CommRegisterAirport(string ident, int chan, atc_type tp) {
 // Note that chan is zero based.
 void FGATCMgr::CommRemoveFromList(const char* id, atc_type tp, int chan) {
        SG_LOG(SG_ATC, SG_BULK, "CommRemoveFromList called for airport " << id << " " << tp << " by channel " << chan);
-       if(airport_atc_map.find((string)id) != airport_atc_map.end()) {
-               AirportATC* a = airport_atc_map[(string)id];
+       if(airport_atc_map.find(id) != airport_atc_map.end()) {
+               AirportATC* a = airport_atc_map[id];
                //cout << "In CommRemoveFromList, a->ground_freq = " << a->ground_freq << endl;
                if(a->set_by_AI && tp != ATIS) {
                        // Set by AI, so don't remove simply because user isn't tuned in any more - just stop displaying
                        SG_LOG(SG_ATC, SG_BULK, "In CommRemoveFromList, service was set by AI\n");
-                       FGATC* aptr = GetATCPointer((string)id, tp);
+                       FGATC* aptr = GetATCPointer(id, tp);
                        switch(chan) {
                        case 0:
                                //cout << "chan 1\n";
@@ -302,7 +302,7 @@ void FGATCMgr::CommRemoveFromList(const char* id, atc_type tp, int chan) {
                                }
                                break;
                        }
-                       airport_atc_map[(string)id] = a;
+                       airport_atc_map[id] = a;
                        return;
                } else {
                        switch(chan) {
index 6c09990b2440b3356343d64519f22e46636a6a8b..4c56b23a44234ca177e7bb5189c10fe89675907f 100644 (file)
@@ -261,7 +261,7 @@ void FGATIS::UpdateTransmission() {
        #endif
        
        string rwy_no = globals->get_runways()->search(ident, int(hdg));
-       if(rwy_no != (string)"NN") {
+       if(rwy_no != "NN") {
                transmission += " / Landing_and_departing_runway ";
                transmission += ConvertRwyNumToSpokenString(atoi(rwy_no.c_str()));
                //cout << "in atis.cxx, r.rwy_no = " << rwy_no << " r.id = " << r->id << " r.heading = " << r->heading << endl;
index 856c3e5dc0ba82f6dc0e55cc06657bc7d2972456..503f298f401b7850c00486b7a4c4fc246acd82b2 100644 (file)
@@ -126,7 +126,7 @@ static string GetReverseRunwayNo(string rwyno) {
            << rwyno << " passed to GetReverseRunwayNo(...)");
        }
     }
-    return((string)buf);
+    return(buf);
 }
 
 
index dcd1a66ce58245749ab21b5e311b61433e793ac8..0ecda901c71b47092d4ee7ff04bf2139bd1a8dde 100644 (file)
@@ -114,7 +114,7 @@ ADF::update (double delta_time_sec)
 
                                 // If it's off, don't bother.
     string mode = _mode_node->getStringValue();
-    if (!_transmitter_valid || (mode != string("bfo") && mode != string("adf")))
+    if (!_transmitter_valid || (mode != "bfo" && mode != "adf"))
     {
         set_bearing(delta_time_sec, 90);
         _ident_node->setStringValue("");
index 33f5f1aa655b8d5bee3c1ce4c9564cd7e660dfd1..fdc58ba9969cd67c1ea0c9d081169091ab803090 100644 (file)
@@ -243,7 +243,7 @@ void FGMultiplayRxMgr::ProcessData(void) {
                     sCallsign = MsgHdr->sCallsign;
 
                     // Process the player data unless we generated it
-                    if (m_sCallsign != string(MsgHdr->sCallsign)) {
+                    if (m_sCallsign != MsgHdr->sCallsign) {
 
 
                         // Process messages
@@ -283,7 +283,7 @@ void FGMultiplayRxMgr::ProcessData(void) {
                                             if (m_Player[iPlayerCnt] == NULL) {
                                                 SG_LOG( SG_NETWORK, SG_INFO, "FGMultiplayRxMgr::ProcessRxData - Add new player. IP: " << sIpAddress << ", Call: " <<  sCallsign << ", model: " << sModelName );
                                                 m_Player[iPlayerCnt] = new MPPlayer;
-                                                m_Player[iPlayerCnt]->Open(string(sIpAddress), iPort, string(sCallsign), string(sModelName), false);
+                                                m_Player[iPlayerCnt]->Open(sIpAddress, iPort, sCallsign, sModelName, false);
                                                 m_Player[iPlayerCnt]->SetPosition(PosMsg->PlayerPos);
                                                 bActivePlayer = true;
                                             }
index 6e7b63de08bff39df470081030df27783272ffee..2df07d557fdd714f4d5accc7e517b5d255f9b445 100644 (file)
@@ -446,7 +446,7 @@ bool FGAtlas::parse_message() {
            string alt_units = msg.substr(begin, end - begin);
            begin = end + 1;
 
-           if ( alt_units != (string)"F" ) {
+           if ( alt_units != "F" ) {
                altitude *= SG_METER_TO_FEET;
            }
 
index 590a92fdaae5f736e8f1ccd46363f23a13693d4d..bd704682323be89d0e02a02825904ed10abf69b6 100644 (file)
@@ -326,7 +326,7 @@ bool FGGarmin::parse_message() {
            string alt_units = msg.substr(begin, end - begin);
            begin = end + 1;
 
-           if ( alt_units != (string)"F" && alt_units != (string)"f" ) {
+           if ( alt_units != "F" && alt_units != "f" ) {
                altitude *= SG_METER_TO_FEET;
            }
 
index 94a5a953265210b75722a5d0b063e592426b27ea..318c69f2a592f4da229a56e22f26180c4c469a96 100644 (file)
@@ -199,7 +199,7 @@ void HttpdChannel::foundTerminator (void) {
                 if ( child->nChildren() > 0 ) {
                     line += "<B><A HREF=\"";
                     line += request;
-                    if ( request.substr(request.length() - 1, 1) != (string)"/" ) {
+                    if ( request.substr(request.length() - 1, 1) != "/" ) {
                         line += "/";
                     }
                     line += urlEncode(name);
@@ -213,7 +213,7 @@ void HttpdChannel::foundTerminator (void) {
                     line += name;
                     line += "</B> <A HREF=\"";
                     line += request;
-                    if ( request.substr(request.length() - 1, 1) != (string)"/" ) {
+                    if ( request.substr(request.length() - 1, 1) != "/" ) {
                         line += "/";
                     }
                     line += urlEncode(name);
index 577e694cc0f7a2ea86f66f8cb939d5e302c257f9..806ff0e99aa352af206492c9a910930e9f76df7e 100644 (file)
@@ -430,7 +430,7 @@ bool FGNMEA::parse_message() {
            string alt_units = msg.substr(begin, end - begin);
            begin = end + 1;
 
-           if ( alt_units != (string)"F" ) {
+           if ( alt_units != "F" ) {
                altitude *= SG_METER_TO_FEET;
            }
 
index b069407c4774d09abe49081e41e2849b581b8bf9..0091e62c682528c8930cb87db62901c64bb421cb 100644 (file)
@@ -62,7 +62,7 @@ FGElectricalSupplier::FGElectricalSupplier ( SGPropertyNode *node ) {
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
         // cout << " scanning: " << child->getName() << endl;
-        if ( (string)child->getName() == "prop" ) {
+        if ( child->getName() == "prop" ) {
             string prop = child->getStringValue();
             // cout << "  Adding prop = " << prop << endl;
             add_prop( prop );
@@ -107,7 +107,7 @@ FGElectricalBus::FGElectricalBus ( SGPropertyNode *node ) {
     int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
-        if ( (string)child->getName() == "prop" ) {
+        if ( child->getName() == "prop" ) {
             string prop = child->getStringValue();
             add_prop( prop );
         }
@@ -122,7 +122,7 @@ FGElectricalOutput::FGElectricalOutput ( SGPropertyNode *node ) {
     int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
-        if ( (string)child->getName() == "prop" ) {
+        if ( child->getName() == "prop" ) {
             string prop = child->getStringValue();
             add_prop( prop );
         }