1
0
Fork 0

Remove ambiguity due to simgear/misc/sgstream.cxx's skipws I/O manipulator

For some reason, g++ may see a 'skipws' I/O manipulator from the
standard library (depending on the order of includes...) when compiling
src/Navaids/poidb.cxx. This I/O manipulator is then in competition with
one with the same name defined in simgear/misc/sgstream.cxx. Use std::ws
to remove all ambiguity (std:skipws does something quite different!).
This commit is contained in:
Florent Rougon 2016-11-01 00:26:57 +01:00
parent 55f64820df
commit c169ef581f

View file

@ -22,6 +22,7 @@
# include "config.h" # include "config.h"
#endif #endif
#include <istream> // std::ws
#include "poidb.hxx" #include "poidb.hxx"
#include <simgear/compiler.h> #include <simgear/compiler.h>
@ -61,7 +62,7 @@ static PositionedID readPOIFromStream(std::istream& aStream, NavDataCache* cache
return 0; return 0;
} }
aStream >> skipws; aStream >> std::ws;
if (aStream.peek() == '#') { if (aStream.peek() == '#') {
aStream >> skipeol; aStream >> skipeol;
return 0; return 0;