summaryrefslogtreecommitdiff
path: root/goo
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2010-04-24 13:04:05 +0100
committerAlbert Astals Cid <aacid@kde.org>2010-04-24 13:04:05 +0100
commit6cc4d571339214e9eeeb682ba48fb220cef905f9 (patch)
tree3bf067ca77491ca5c98e526903fb5260c858f73e /goo
parent4ed53e30e735b79c46eab9d54883531c6e187b17 (diff)
Fix end() to return the correct last valid value
Diffstat (limited to 'goo')
-rw-r--r--goo/GooVector.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/goo/GooVector.h b/goo/GooVector.h
index d396c6f4..e35fd8ae 100644
--- a/goo/GooVector.h
+++ b/goo/GooVector.h
@@ -5,6 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright 2010 David Benjamin <davidben@mit.edu>
+// Copyright 2010 Albert Astals Cid <aacid@kde.org>
//
//========================================================================
@@ -58,8 +59,8 @@ public:
iterator begin() { return m_data; }
const_iterator begin() const { return m_data; }
- iterator end() { return m_data + m_capacity; }
- const_iterator end() const { return m_data + m_capacity; }
+ iterator end() { return m_data + m_size; }
+ const_iterator end() const { return m_data + m_size; }
size_type size() const { return m_size; }
size_type capacity() const { return m_capacity; }