Make memory_c::add() use const buffer

This commit is contained in:
Moritz Bunkus 2012-02-26 11:48:49 +01:00
parent 97cc212165
commit 42e5173ae5
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ memory_c::resize(size_t new_size)
}
void
memory_c::add(unsigned char *new_buffer,
memory_c::add(unsigned char const *new_buffer,
size_t new_size) {
if ((0 == new_size) || (NULL == new_buffer))
return;

View File

@ -169,8 +169,8 @@ public:
}
void resize(size_t new_size) throw();
void add(unsigned char *new_buffer, size_t new_size);
void add(memory_cptr &new_buffer) {
void add(unsigned char const *new_buffer, size_t new_size);
void add(memory_cptr const &new_buffer) {
add(new_buffer->get_buffer(), new_buffer->get_size());
}