Adapt to revised SGMetar API
API is changed to use strings instead of raw pointers.
This commit is contained in:
parent
c136b31791
commit
d576b4c6e9
2 changed files with 4 additions and 4 deletions
|
@ -151,7 +151,7 @@ FGMetar::FGMetar(const string& icao) :
|
||||||
|
|
||||||
_time = sgTimeGetGMT(_year - 1900, _month - 1, _day, _hour, _minute, 0);
|
_time = sgTimeGetGMT(_year - 1900, _month - 1, _day, _hour, _minute, 0);
|
||||||
|
|
||||||
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "FGMetar:" << getRawDataPtr());
|
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "FGMetar:" << getDataString());
|
||||||
if (_x_proxy)
|
if (_x_proxy)
|
||||||
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "METAR from proxy");
|
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "METAR from proxy");
|
||||||
else
|
else
|
||||||
|
|
|
@ -385,10 +385,10 @@ int main(int argc, char *argv[])
|
||||||
//SGMetar *m = new SGMetar("2004/01/11 01:20\nLOWG 110120Z AUTO VRB01KT 0050 1600N R35/0600 FG M06/M06 Q1019 88//////\n");
|
//SGMetar *m = new SGMetar("2004/01/11 01:20\nLOWG 110120Z AUTO VRB01KT 0050 1600N R35/0600 FG M06/M06 Q1019 88//////\n");
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
cerr << G "INPUT: " << m->getData() << "" N << endl;
|
cerr << G "INPUT: " << m->getDataString() << "" N << endl;
|
||||||
|
|
||||||
const char *unused = m->getUnusedData();
|
const auto unused = m->getUnparsedData();
|
||||||
if (*unused)
|
if (!unused.empty())
|
||||||
cerr << R "UNUSED: " << unused << "" N << endl;
|
cerr << R "UNUSED: " << unused << "" N << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue