aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2009-10-03 11:53:00 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-10-03 11:53:00 (GMT)
commit69bf3965b74a4d0435179f0e1095339384e81b2c (patch)
treeec0dac52ed18886399ba69fb55356108dd89c005
parenta973154c668bd4d3267de6edcafa1a3adcfd3e9b (diff)
downloadfluxbox_paul-69bf3965b74a4d0435179f0e1095339384e81b2c.zip
fluxbox_paul-69bf3965b74a4d0435179f0e1095339384e81b2c.tar.bz2
compile fixes for sun compiler 5.10: class Layer conflicts with class FbTk/Layer .. so just a little renaming
-rw-r--r--src/FbTk/Layer.hh14
-rw-r--r--src/FbTk/XLayer.hh2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/FbTk/Layer.hh b/src/FbTk/Layer.hh
index aabbe08..5836c9c 100644
--- a/src/FbTk/Layer.hh
+++ b/src/FbTk/Layer.hh
@@ -29,12 +29,12 @@
29namespace FbTk { 29namespace FbTk {
30 30
31template <typename ItemType, typename Container = std::vector<ItemType *> > 31template <typename ItemType, typename Container = std::vector<ItemType *> >
32class Layer { 32class LayerBase {
33public: 33public:
34 typedef Container ListType; 34 typedef Container ListType;
35 typedef typename Container::iterator iterator; 35 typedef typename Container::iterator iterator;
36 typedef typename Container::reverse_iterator reverse_iterator; 36 typedef typename Container::reverse_iterator reverse_iterator;
37 virtual ~Layer() { } 37 virtual ~LayerBase() { }
38 /// insert in top by default 38 /// insert in top by default
39 virtual iterator insert(ItemType &item, unsigned int pos=0); 39 virtual iterator insert(ItemType &item, unsigned int pos=0);
40 /// remove item from list 40 /// remove item from list
@@ -56,7 +56,7 @@ private:
56}; 56};
57 57
58template <typename ItemType, typename Container> 58template <typename ItemType, typename Container>
59typename Container::iterator Layer<ItemType, Container>::insert(ItemType &item, unsigned int position) { 59typename Container::iterator LayerBase<ItemType, Container>::insert(ItemType &item, unsigned int position) {
60 // make sure we don't alreay have it in the list 60 // make sure we don't alreay have it in the list
61 if (std::find(itemList().begin(), itemList().end(), &item) != itemList().end()) 61 if (std::find(itemList().begin(), itemList().end(), &item) != itemList().end())
62 return m_list.end(); 62 return m_list.end();
@@ -76,14 +76,14 @@ typename Container::iterator Layer<ItemType, Container>::insert(ItemType &item,
76 76
77 77
78template <typename ItemType, typename Container> 78template <typename ItemType, typename Container>
79void Layer<ItemType, Container>::remove(ItemType &item) { 79void LayerBase<ItemType, Container>::remove(ItemType &item) {
80 iterator it = std::find(itemList().begin(), itemList().end(), &item); 80 iterator it = std::find(itemList().begin(), itemList().end(), &item);
81 if (it != itemList().end()) 81 if (it != itemList().end())
82 m_list.erase(it); 82 m_list.erase(it);
83} 83}
84 84
85template <typename ItemType, typename Container> 85template <typename ItemType, typename Container>
86void Layer<ItemType, Container>::raise(ItemType &item) { 86void LayerBase<ItemType, Container>::raise(ItemType &item) {
87 if (&item == itemList().front()) // already at the bottom 87 if (&item == itemList().front()) // already at the bottom
88 return; 88 return;
89 remove(item); 89 remove(item);
@@ -92,7 +92,7 @@ void Layer<ItemType, Container>::raise(ItemType &item) {
92} 92}
93 93
94template <typename ItemType, typename Container> 94template <typename ItemType, typename Container>
95void Layer<ItemType, Container>::lower(ItemType &item) { 95void LayerBase<ItemType, Container>::lower(ItemType &item) {
96 if (&item == itemList().back()) // already at the bottom 96 if (&item == itemList().back()) // already at the bottom
97 return; 97 return;
98 remove(item); 98 remove(item);
@@ -101,7 +101,7 @@ void Layer<ItemType, Container>::lower(ItemType &item) {
101} 101}
102 102
103template <typename ItemType, typename Container> 103template <typename ItemType, typename Container>
104void Layer<ItemType, Container>::restack() { 104void LayerBase<ItemType, Container>::restack() {
105} 105}
106 106
107 107
diff --git a/src/FbTk/XLayer.hh b/src/FbTk/XLayer.hh
index 6018b8a..ba5406b 100644
--- a/src/FbTk/XLayer.hh
+++ b/src/FbTk/XLayer.hh
@@ -31,7 +31,7 @@ namespace FbTk {
31class MultLayers; 31class MultLayers;
32class XLayerItem; 32class XLayerItem;
33 33
34class XLayer : public FbTk::Layer<XLayerItem, std::list<XLayerItem *> > { 34class XLayer : public FbTk::LayerBase<XLayerItem, std::list<XLayerItem *> > {
35public: 35public:
36 36
37 XLayer(MultLayers &manager, int layernum); 37 XLayer(MultLayers &manager, int layernum);