From 167f765128c4aced6c6a9dcf73f16b933910a798 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 14 Nov 2007 18:08:10 +0000 Subject: Rename MemoryRegion::append to push_back Change all callers in the library and self-test code. --- include/secmem.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/secmem.h b/include/secmem.h index b50022c83..a38f28a79 100644 --- a/include/secmem.h +++ b/include/secmem.h @@ -52,10 +52,11 @@ class MemoryRegion void set(const T in[], u32bit n) { create(n); copy(in, n); } void set(const MemoryRegion& in) { set(in.begin(), in.size()); } - void append(const T data[], u32bit n) + void push_back(T x) { push_back(&x, 1); } + void push_back(const T data[], u32bit n) { grow_to(size()+n); copy(size() - n, data, n); } - void append(T x) { append(&x, 1); } - void append(const MemoryRegion& x) { append(x.begin(), x.size()); } + void push_back(const MemoryRegion& x) + { push_back(x.begin(), x.size()); } void clear() { clear_mem(buf, allocated); } void destroy() { create(0); } @@ -172,7 +173,7 @@ class MemoryVector : public MemoryRegion MemoryVector(const MemoryRegion& in) { MemoryRegion::init(false); set(in); } MemoryVector(const MemoryRegion& in1, const MemoryRegion& in2) - { MemoryRegion::init(false); set(in1); append(in2); } + { MemoryRegion::init(false); set(in1); push_back(in2); } }; /************************************************* @@ -191,7 +192,7 @@ class SecureVector : public MemoryRegion SecureVector(const MemoryRegion& in) { MemoryRegion::init(true); set(in); } SecureVector(const MemoryRegion& in1, const MemoryRegion& in2) - { MemoryRegion::init(true); set(in1); append(in2); } + { MemoryRegion::init(true); set(in1); push_back(in2); } }; /************************************************* -- cgit v1.2.3