1
0
Fork 0

Convert some char* return types to string

This commit is contained in:
daveluff 2004-03-19 13:46:15 +00:00
parent f7fc455b0d
commit 4d25095e76
3 changed files with 7 additions and 7 deletions

View file

@ -169,9 +169,9 @@ public:
inline void set_freq(const int fq) {freq = fq;}
inline int get_range() const { return range; }
inline void set_range(const int rg) {range = rg;}
inline const char* get_ident() { return ident.c_str(); }
inline string get_ident() { return ident; }
inline void set_ident(const string id) { ident = id; }
inline const char* get_name() {return name.c_str();}
inline string get_name() { return name; }
inline void set_name(const string nm) { name = nm; }
protected:

View file

@ -399,7 +399,7 @@ void FGATCDialog::PopupCallback() {
} else if(atcptr->GetType() == TOWER) {
//cout << "TOWER " << endl;
//cout << "ident is " << atcptr->get_ident() << endl;
atcmentry_vec_type atcmlist = (available_dialog[TOWER])[(string)atcptr->get_ident()];
atcmentry_vec_type atcmlist = (available_dialog[TOWER])[atcptr->get_ident()];
if(atcmlist.size()) {
//cout << "Doing callback...\n";
ATCMenuEntry a = atcmlist[atcDialogCommunicationOptions->getValue()];

View file

@ -373,7 +373,7 @@ void FGATCMgr::RemoveFromList(string id, atc_type tp) {
while(it != atc_list.end()) {
//cout << "type = " << (*it)->GetType() << '\n';
//cout << "Ident = " << (*it)->get_ident() << '\n';
if( (!strcmp((*it)->get_ident(), id.c_str()))
if( ((*it)->get_ident() == id)
&& ((*it)->GetType() == tp) ) {
//Before removing it stop it transmitting!!
//cout << "OBLITERATING FROM LIST!!!\n";
@ -396,7 +396,7 @@ FGATC* FGATCMgr::FindInList(string id, atc_type tp) {
//cout << "Entering FindInList for " << id << ' ' << tp << endl;
atc_list_iterator it = atc_list.begin();
while(it != atc_list.end()) {
if( (!strcmp((*it)->get_ident(), id.c_str()))
if( ((*it)->get_ident() == id)
&& ((*it)->GetType() == tp) ) {
return(*it);
}