Convert some char* return types to string
This commit is contained in:
parent
f7fc455b0d
commit
4d25095e76
3 changed files with 7 additions and 7 deletions
|
@ -169,10 +169,10 @@ 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 void set_ident(const string id) {ident = id;}
|
||||
inline const char* get_name() {return name.c_str();}
|
||||
inline void set_name(const string nm) {name = nm;}
|
||||
inline string get_ident() { return ident; }
|
||||
inline void set_ident(const string id) { ident = id; }
|
||||
inline string get_name() { return name; }
|
||||
inline void set_name(const string nm) { name = nm; }
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -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()];
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue