diff options
Diffstat (limited to 'src/PacketDataStream.h')
-rw-r--r-- | src/PacketDataStream.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/PacketDataStream.h b/src/PacketDataStream.h index 30ba8d01a..f3241bb92 100644 --- a/src/PacketDataStream.h +++ b/src/PacketDataStream.h @@ -93,6 +93,8 @@ public: const unsigned char *dataPtr() const { return reinterpret_cast< const unsigned char * >(&data[offset]); } + unsigned char *dataPtr() { return reinterpret_cast< unsigned char * >(&data[offset]); } + const char *charPtr() const { return reinterpret_cast< const char * >(&data[offset]); } QByteArray dataBlock(quint32 len) { @@ -116,6 +118,8 @@ protected: } public: + PacketDataStream(const unsigned char *d, int msize) { setup(const_cast< unsigned char * >(d), msize); }; + PacketDataStream(const char *d, int msize) { setup(const_cast< unsigned char * >(reinterpret_cast< const unsigned char * >(d)), msize); }; |