mirror of https://github.com/axmolengine/axmol.git
[FIX]: copied data should be const
This commit is contained in:
parent
ea2165e6ba
commit
a4b4efff1b
|
@ -100,7 +100,7 @@ ssize_t Data::getSize() const
|
|||
return _size;
|
||||
}
|
||||
|
||||
void Data::copy(unsigned char* bytes, const ssize_t size)
|
||||
void Data::copy(const unsigned char* bytes, const ssize_t size)
|
||||
{
|
||||
clear();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
* Developer should free the pointer after invoking this method.
|
||||
* @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.
|
||||
* @param bytes The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc',
|
||||
|
|
Loading…
Reference in New Issue