diff options
author | Peter Feigl <craven@gmx.net> | 2014-02-26 12:29:57 +0100 |
---|---|---|
committer | Peter Feigl <craven@gmx.net> | 2014-02-26 12:29:57 +0100 |
commit | 7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46 (patch) | |
tree | 10aff721c492d7bfa586c9d5fd4514948b7188ea /src/pstream.h | |
parent | bc08eed3cb1bdb4f67d1b77273f3254d0cf13be2 (diff) | |
download | fork-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.h | 5 |
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; |