aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-11-15 03:26:58 +0000
committerlloyd <[email protected]>2007-11-15 03:26:58 +0000
commiteea881973fc97d1e3ccd4ce358229bd2459acb25 (patch)
tree677121e3a220b37257287b7a0796a14c5145c1af /include
parenta731f8135bfd322d187dff46b0b1c3cdc0e76cba (diff)
Revert the change that renamed append() to push_back(). As pointed out
by Joel Low on the mailing list, the STL container types have only a single version of push_back(), along with variations of insert() for handling range-based appending.
Diffstat (limited to 'include')
-rw-r--r--include/secmem.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/secmem.h b/include/secmem.h
index a38f28a79..b50022c83 100644
--- a/include/secmem.h
+++ b/include/secmem.h
@@ -52,11 +52,10 @@ class MemoryRegion
void set(const T in[], u32bit n) { create(n); copy(in, n); }
void set(const MemoryRegion<T>& in) { set(in.begin(), in.size()); }
- void push_back(T x) { push_back(&x, 1); }
- void push_back(const T data[], u32bit n)
+ void append(const T data[], u32bit n)
{ grow_to(size()+n); copy(size() - n, data, n); }
- void push_back(const MemoryRegion<T>& x)
- { push_back(x.begin(), x.size()); }
+ void append(T x) { append(&x, 1); }
+ void append(const MemoryRegion<T>& x) { append(x.begin(), x.size()); }
void clear() { clear_mem(buf, allocated); }
void destroy() { create(0); }
@@ -173,7 +172,7 @@ class MemoryVector : public MemoryRegion<T>
MemoryVector(const MemoryRegion<T>& in)
{ MemoryRegion<T>::init(false); set(in); }
MemoryVector(const MemoryRegion<T>& in1, const MemoryRegion<T>& in2)
- { MemoryRegion<T>::init(false); set(in1); push_back(in2); }
+ { MemoryRegion<T>::init(false); set(in1); append(in2); }
};
/*************************************************
@@ -192,7 +191,7 @@ class SecureVector : public MemoryRegion<T>
SecureVector(const MemoryRegion<T>& in)
{ MemoryRegion<T>::init(true); set(in); }
SecureVector(const MemoryRegion<T>& in1, const MemoryRegion<T>& in2)
- { MemoryRegion<T>::init(true); set(in1); push_back(in2); }
+ { MemoryRegion<T>::init(true); set(in1); append(in2); }
};
/*************************************************