aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-18 16:59:34 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-18 16:59:34 +0000
commit7076320913b104c0ac97771a6e9a2dab36ab99cd (patch)
tree8a9d04d5bff746d184551e33756a4730dfe516d1
parent90768a11debecfb3be895fb0fb3e176431cd6bd0 (diff)
downloadpaludis-7076320913b104c0ac97771a6e9a2dab36ab99cd.tar.gz
paludis-7076320913b104c0ac97771a6e9a2dab36ab99cd.tar.xz
Add pop methods to Sequence
-rw-r--r--paludis/util/sequence-impl.hh16
-rw-r--r--paludis/util/sequence.hh5
2 files changed, 19 insertions, 2 deletions
diff --git a/paludis/util/sequence-impl.hh b/paludis/util/sequence-impl.hh
index 9cf05d9..1efb368 100644
--- a/paludis/util/sequence-impl.hh
+++ b/paludis/util/sequence-impl.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -126,6 +126,20 @@ paludis::Sequence<T_>::push_front(const T_ & t)
}
template <typename T_>
+void
+paludis::Sequence<T_>::pop_back()
+{
+ _imp->list.pop_back();
+}
+
+template <typename T_>
+void
+paludis::Sequence<T_>::pop_front()
+{
+ _imp->list.pop_front();
+}
+
+template <typename T_>
bool
paludis::Sequence<T_>::empty() const
{
diff --git a/paludis/util/sequence.hh b/paludis/util/sequence.hh
index 2739519..fc3c268 100644
--- a/paludis/util/sequence.hh
+++ b/paludis/util/sequence.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -106,6 +106,9 @@ namespace paludis
void push_back(const T_ &);
void push_front(const T_ &);
+ void pop_front();
+ void pop_back();
+
template <typename C_>
void sort(const C_ &);