X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fseekable.h;h=99915d850efc3a8879d88a7e9e3e9de7e11eb531;hp=9522311f55b32ae2f75bd2f62f9e233a3f28a6fd;hb=b116e161e377da0e4e52f07745ecb2d22f962ae9;hpb=d16185720fa344263367dbd50c61bfc8183d99a4 diff --git a/source/io/seekable.h b/source/io/seekable.h index 9522311..99915d8 100644 --- a/source/io/seekable.h +++ b/source/io/seekable.h @@ -1,6 +1,8 @@ #ifndef MSP_IO_SEEKABLE_H_ #define MSP_IO_SEEKABLE_H_ +#include +#include #include "base.h" namespace Msp { @@ -8,11 +10,7 @@ namespace IO { class Handle; -#ifdef MSVC -typedef __int64 SeekOffset; -#else -typedef long long SeekOffset; -#endif +typedef std::int64_t SeekOffset; enum SeekType { @@ -22,6 +20,14 @@ enum SeekType }; +class bad_seek: public std::runtime_error +{ +public: + bad_seek(SeekOffset, SeekType); + virtual ~bad_seek() throw() { } +}; + + class Seekable: public Base { protected: