Merge pull request #209 from theirix/fix-const_cast

Replaced C-casts with const_cast for Envelope::body_
This commit is contained in:
Emiel Bruijntjes 2018-04-18 14:39:45 +02:00 committed by GitHub
commit 76144088cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ public:
* @param body
* @param size
*/
Envelope(const char *body, uint64_t size) : MetaData(), _body((char *)body), _bodySize(size) {}
Envelope(const char *body, uint64_t size) : MetaData(), _body(const_cast<char *>(body)), _bodySize(size) {}
/**
* Disabled copy constructor

View File

@ -103,7 +103,7 @@ protected:
{
// we do not have to combine multiple frames, so we can store
// the buffer pointer in the message
_body = (char *)buffer;
_body = const_cast<char *>(buffer);
}
else
{