summaryrefslogtreecommitdiff
path: root/src/pstream.h
diff options
context:
space:
mode:
authorPeter Feigl <craven@gmx.net>2014-02-26 12:29:57 +0100
committerPeter Feigl <craven@gmx.net>2014-02-26 12:29:57 +0100
commit7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46 (patch)
tree10aff721c492d7bfa586c9d5fd4514948b7188ea /src/pstream.h
parentbc08eed3cb1bdb4f67d1b77273f3254d0cf13be2 (diff)
downloadfork-ledger-7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46.tar.gz
fork-ledger-7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46.tar.bz2
fork-ledger-7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46.zip
Fixing two GCC warnings
Diffstat (limited to 'src/pstream.h')
-rw-r--r--src/pstream.h5
1 files changed, 4 insertions, 1 deletions
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<int>(way)) {
case std::ios::cur:
setg(ptr, gptr()+off, ptr+len);
break;