[FIX]: copied data should be const

This commit is contained in:
Mazyad Alabduljaleel 2014-07-18 03:44:39 +04:00
parent ea2165e6ba
commit a4b4efff1b
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ ssize_t Data::getSize() const
return _size; return _size;
} }
void Data::copy(unsigned char* bytes, const ssize_t size) void Data::copy(const unsigned char* bytes, const ssize_t size)
{ {
clear(); clear();

View File

@ -63,7 +63,7 @@ public:
* Developer should free the pointer after invoking this method. * Developer should free the pointer after invoking this method.
* @see Data::fastSet * @see Data::fastSet
*/ */
void copy(unsigned char* bytes, const ssize_t size); void copy(const unsigned char* bytes, const ssize_t size);
/** Fast set the buffer pointer and its size. Please use it carefully. /** Fast set the buffer pointer and its size. Please use it carefully.
* @param bytes The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc', * @param bytes The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc',