diff options
Diffstat (limited to 'src/FbTk/MultLayers.cc')
-rw-r--r-- | src/FbTk/MultLayers.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/FbTk/MultLayers.cc b/src/FbTk/MultLayers.cc index 9e3272b..9875ef7 100644 --- a/src/FbTk/MultLayers.cc +++ b/src/FbTk/MultLayers.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: MultLayers.cc,v 1.7 2003/07/20 18:05:39 rathnor Exp $ | 23 | // $Id: MultLayers.cc,v 1.8 2004/01/08 22:04:04 fluxgen Exp $ |
24 | 24 | ||
25 | #include "MultLayers.hh" | 25 | #include "MultLayers.hh" |
26 | #include "XLayer.hh" | 26 | #include "XLayer.hh" |
@@ -48,7 +48,7 @@ MultLayers::~MultLayers() { | |||
48 | 48 | ||
49 | 49 | ||
50 | XLayerItem *MultLayers::getLowestItemAboveLayer(int layernum) { | 50 | XLayerItem *MultLayers::getLowestItemAboveLayer(int layernum) { |
51 | if (layernum >= m_layers.size() || layernum <= 0) | 51 | if (layernum >= static_cast<signed>(m_layers.size()) || layernum <= 0) |
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | layernum--; // next one up | 54 | layernum--; // next one up |
@@ -92,7 +92,7 @@ XLayerItem *MultLayers::getItemAbove(XLayerItem &item) { | |||
92 | void MultLayers::addToTop(XLayerItem &item, int layernum) { | 92 | void MultLayers::addToTop(XLayerItem &item, int layernum) { |
93 | if (layernum < 0) | 93 | if (layernum < 0) |
94 | layernum = 0; | 94 | layernum = 0; |
95 | else if (layernum >= m_layers.size()) | 95 | else if (layernum >= static_cast<signed>(m_layers.size())) |
96 | layernum = m_layers.size()-1; | 96 | layernum = m_layers.size()-1; |
97 | 97 | ||
98 | m_layers[layernum]->insert(item); | 98 | m_layers[layernum]->insert(item); |
@@ -103,7 +103,7 @@ void MultLayers::addToTop(XLayerItem &item, int layernum) { | |||
103 | // raise the whole layer | 103 | // raise the whole layer |
104 | void MultLayers::raise(XLayer &layer) { | 104 | void MultLayers::raise(XLayer &layer) { |
105 | int layernum = layer.getLayerNum(); | 105 | int layernum = layer.getLayerNum(); |
106 | if (layernum >= (m_layers.size() - 1)) | 106 | if (layernum >= static_cast<signed>(m_layers.size() - 1)) |
107 | // already on top | 107 | // already on top |
108 | return; | 108 | return; |
109 | 109 | ||
@@ -145,7 +145,7 @@ void MultLayers::moveToLayer(XLayerItem &item, int layernum) { | |||
145 | // clamp layer number | 145 | // clamp layer number |
146 | if (layernum < 0) | 146 | if (layernum < 0) |
147 | layernum = 0; | 147 | layernum = 0; |
148 | else if (layernum >= m_layers.size()) | 148 | else if (layernum >= static_cast<signed>(m_layers.size())) |
149 | layernum = m_layers.size()-1; | 149 | layernum = m_layers.size()-1; |
150 | // remove item from old layer and insert it into the | 150 | // remove item from old layer and insert it into the |
151 | item.setLayer(*m_layers[layernum]); | 151 | item.setLayer(*m_layers[layernum]); |
@@ -158,7 +158,7 @@ void MultLayers::restack() { | |||
158 | int layernum=0, winnum=0, size = this->size(); | 158 | int layernum=0, winnum=0, size = this->size(); |
159 | 159 | ||
160 | Window *winlist = new Window[size]; | 160 | Window *winlist = new Window[size]; |
161 | for (layernum=0; layernum < m_layers.size(); layernum++) { | 161 | for (layernum=0; layernum < static_cast<signed>(m_layers.size()); layernum++) { |
162 | 162 | ||
163 | XLayer::ItemList::iterator it = m_layers[layernum]->getItemList().begin(); | 163 | XLayer::ItemList::iterator it = m_layers[layernum]->getItemList().begin(); |
164 | XLayer::ItemList::iterator it_end = m_layers[layernum]->getItemList().end(); | 164 | XLayer::ItemList::iterator it_end = m_layers[layernum]->getItemList().end(); |
@@ -181,7 +181,7 @@ void MultLayers::restack() { | |||
181 | 181 | ||
182 | int MultLayers::size() { | 182 | int MultLayers::size() { |
183 | int i = 0, num = 0; | 183 | int i = 0, num = 0; |
184 | for (; i < m_layers.size(); i++) { | 184 | for (; i < static_cast<signed>(m_layers.size()); i++) { |
185 | num += m_layers[i]->countWindows(); | 185 | num += m_layers[i]->countWindows(); |
186 | } | 186 | } |
187 | return num; | 187 | return num; |