X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fmetar_main.cxx;h=9158dc89a1ec891d2ec1112003f2c3f44fb76e4a;hb=33425c671d20fc7a7fbb87c2db28aef455b5b5dd;hp=7b904d3a245f492f97246ca1a2613c766926557e;hpb=7c44fd4799c6d0a2d2c87b9c4a6f2eeab76ccf88;p=flightgear.git diff --git a/src/Main/metar_main.cxx b/src/Main/metar_main.cxx index 7b904d3a2..9158dc89a 100644 --- a/src/Main/metar_main.cxx +++ b/src/Main/metar_main.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -33,6 +34,7 @@ #include #include +#include #include using namespace std; @@ -328,7 +330,7 @@ void printReport(SGMetar *m) surface.push_back(buf); } - if (surface.size()) { + if (! surface.empty()) { vector::iterator rwysurf = surface.begin(); for (i = 0; rwysurf != surface.end(); rwysurf++, i++) { if (i) @@ -547,6 +549,8 @@ int main(int argc, char *argv[]) string proxy_host, proxy_port; getproxy(proxy_host, proxy_port); + Socket::initSockets(); + HTTP::Client http; http.setProxy(proxy_host, atoi(proxy_port.c_str()));