1
0
Fork 0

Adapt to revised SGMetar API

API is changed to use strings instead of raw pointers.
This commit is contained in:
James Turner 2021-10-15 15:32:11 +01:00
parent c136b31791
commit d576b4c6e9
2 changed files with 4 additions and 4 deletions

View file

@ -151,7 +151,7 @@ FGMetar::FGMetar(const string& icao) :
_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)
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "METAR from proxy");
else

View file

@ -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");
if (verbose) {
cerr << G "INPUT: " << m->getData() << "" N << endl;
cerr << G "INPUT: " << m->getDataString() << "" N << endl;
const char *unused = m->getUnusedData();
if (*unused)
const auto unused = m->getUnparsedData();
if (!unused.empty())
cerr << R "UNUSED: " << unused << "" N << endl;
}