From 42e5173ae56db7f4168908f2e274c6b943e22c25 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 26 Feb 2012 11:48:49 +0100 Subject: [PATCH] Make memory_c::add() use const buffer --- src/common/memory.cpp | 2 +- src/common/memory.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/memory.cpp b/src/common/memory.cpp index fbd7617e0..30c57720f 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -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; diff --git a/src/common/memory.h b/src/common/memory.h index 0f5f3d5a6..35683600a 100644 --- a/src/common/memory.h +++ b/src/common/memory.h @@ -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()); }