X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fmemory.h;h=e009cfdd24965d701d745e4dd865734615d4e85c;hb=c77c9fc85ca6b9fc111b1a3d8a84c3903e3dd646;hp=75cf7f5a6056ff052ebef19b4622692f6bf138d5;hpb=991fabc1956b73a4007859058fb44171000b452e;p=libs%2Fcore.git diff --git a/source/io/memory.h b/source/io/memory.h index 75cf7f5..e009cfd 100644 --- a/source/io/memory.h +++ b/source/io/memory.h @@ -1,12 +1,13 @@ #ifndef MSP_IO_MEMORY_H_ #define MSP_IO_MEMORY_H_ +#include #include "seekable.h" namespace Msp { namespace IO { -class Memory: public Seekable +class MSPCORE_API Memory: public Seekable { private: char *begin = nullptr; @@ -14,10 +15,10 @@ private: char *pos = nullptr; public: - Memory(char *d, std::size_t s, Mode m = M_RDWR): Memory(d, d+s, m) { } + Memory(char *d, std::size_t s, Mode m = M_RDWR); Memory(char *, char *, Mode = M_RDWR); - Memory(const char *d, std::size_t s): Memory(const_cast(d), const_cast(d+s), M_READ) { } - Memory(const char *b, const char *e): Memory(const_cast(b), const_cast(e), M_READ) { } + Memory(const char *d, std::size_t s); + Memory(const char *b, const char *e); void set_block(bool) override; void set_inherit(bool) override;