aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-29 15:15:30 +0000
committerlloyd <[email protected]>2010-10-29 15:15:30 +0000
commit66b163323d39ac5c0be30fd0b1c0fd91b64a55f3 (patch)
treee745b4824105f600ec5452e591a112229bc01478 /src/alloc
parent89a2e78d2ff2f0266825708a0294b13a4c370a29 (diff)
Make MemoryRegion::set protected, change all callers
Diffstat (limited to 'src/alloc')
-rw-r--r--src/alloc/secmem.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h
index cbc4354ad..5261724ae 100644
--- a/src/alloc/secmem.h
+++ b/src/alloc/secmem.h
@@ -135,18 +135,12 @@ class MemoryRegion
* @param in the array to copy the contents from
* @param n the length of in
*/
+#if 1
void copy(size_t off, const T in[], size_t n)
{
copy_mem(buf + off, in, std::min(n, size() - off));
}
-
- /**
- * Set the contents of this according to the argument. The size of
- * this is increased if necessary.
- * @param in the array of objects of type T to copy the contents from
- * @param n the size of array in
- */
- void set(const T in[], size_t n) { resize(n); copy(in, n); }
+#endif
/**
* Append a single element.
@@ -193,6 +187,14 @@ class MemoryRegion
}
/**
+ * Set the contents of this according to the argument. The size of
+ * this is increased if necessary.
+ * @param in the array of objects of type T to copy the contents from
+ * @param n the size of array in
+ */
+ void set(const T in[], size_t n) { resize(n); copy(in, n); }
+
+ /**
* @param locking should we use a locking allocator
* @param length the initial length to use
*/