* mln/util/array.hh: add resize().
---
milena/ChangeLog | 6 ++++++
milena/mln/util/array.hh | 11 +++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 40d1f74..75d390b 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-21 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add missing resize() method to util::array.
+
+ * mln/util/array.hh: add resize().
+
2008-10-22 Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
Fix Registration. Add tests.
diff --git a/milena/mln/util/array.hh b/milena/mln/util/array.hh
index 65b9282..66b41a8 100644
--- a/milena/mln/util/array.hh
+++ b/milena/mln/util/array.hh
@@ -90,6 +90,9 @@ namespace mln
/// Reserve memory for \p n elements.
void reserve(unsigned n);
+ /// Resize this array to \p n elements.
+ void resize(unsigned n);
+
/// Add the element \p elt at the end of this array.
array<T>& append(const T& elt);
@@ -257,6 +260,14 @@ namespace mln
template <typename T>
inline
+ void
+ array<T>::resize(unsigned n)
+ {
+ v_.resize(n);
+ }
+
+ template <typename T>
+ inline
array<T>&
array<T>::append(const T& elt)
{
--
1.5.6.5
Show replies by date