X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2FATCDialog.cxx;h=f5f5ec935d3f337e7b1efe4ad1cb7b2e613d503b;hb=8a089f6d6f9e7851e73fd118cb9a5f5583cfe517;hp=f094b1170cc82893a419028af4a11e132cd890ce;hpb=14a09673b958e197ce4450c7e4a5b3da55170d3d;p=flightgear.git diff --git a/src/ATCDCL/ATCDialog.cxx b/src/ATCDCL/ATCDialog.cxx index f094b1170..f5f5ec935 100644 --- a/src/ATCDCL/ATCDialog.cxx +++ b/src/ATCDCL/ATCDialog.cxx @@ -382,7 +382,6 @@ void FGATCDialog::FreqDisplay(string& ident) { comm_list_type stations; int found = current_commlist->FindByPos(a->geod(), 20.0, &stations); if(found) { - ostringstream ostr; comm_list_iterator itr = stations.begin(); for (n = 0; itr != stations.end(); ++itr) { if(itr->ident != ident) @@ -396,8 +395,9 @@ void FGATCDialog::FreqDisplay(string& ident) { copyProperties(freq_group->getNode("group-template", true), entry); entry->removeChildren("enabled", true); + ostringstream ostr; ostr << itr->type; - entry->setStringValue("text[0]/label", ostr.str().c_str()); + entry->setStringValue("text[0]/label", ostr.str()); char buf[8]; snprintf(buf, 8, "%.2f", (itr->freq / 100.0)); // Convert from KHz to MHz @@ -406,8 +406,6 @@ void FGATCDialog::FreqDisplay(string& ident) { buf[7] = '\0'; entry->setStringValue("text[1]/label", buf); - - ostr.seekp(0); n++; } }