diff options
Diffstat (limited to 'Build/source/utils/asymptote/common.h')
-rw-r--r-- | Build/source/utils/asymptote/common.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/common.h b/Build/source/utils/asymptote/common.h index 8b45967d1f9..80dfef8ac31 100644 --- a/Build/source/utils/asymptote/common.h +++ b/Build/source/utils/asymptote/common.h @@ -16,7 +16,7 @@ #include "config.h" #endif -#if !defined(FOR_SHARED) && \ +#if !defined(FOR_SHARED) && \ ((defined(HAVE_LIBGL) && defined(HAVE_LIBGLUT) && defined(HAVE_LIBGLM)) || \ defined(HAVE_LIBOSMESA)) #define HAVE_GL @@ -88,4 +88,13 @@ using mem::istringstream; using mem::ostringstream; using mem::stringbuf; -#endif +static const struct ws_t {} ws={}; + +// Portable way of skipping whitespace +inline std::istream &operator >> (std::istream & s, const ws_t &ws) { + if(!s.eof()) + s >> std::ws; + return s; +} + +#endif |