From 7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46 Mon Sep 17 00:00:00 2001 From: Peter Feigl Date: Wed, 26 Feb 2014 12:29:57 +0100 Subject: Fixing two GCC warnings --- src/pstream.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pstream.h') diff --git a/src/pstream.h b/src/pstream.h index bcbf6755..ed314068 100644 --- a/src/pstream.h +++ b/src/pstream.h @@ -83,7 +83,10 @@ class ptristream : public std::istream virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode) { - switch (way) { + // cast to avoid gcc '-Wswitch' warning + // as ios_base::beg/cur/end are not necesssarily values of 'way' enum type ios_base::seekdir + // based on https://svn.boost.org/trac/boost/ticket/7644 + switch (static_cast(way)) { case std::ios::cur: setg(ptr, gptr()+off, ptr+len); break; -- cgit v1.2.3