From: fredb Date: Sun, 26 Jul 2009 20:24:57 +0000 (+0000) Subject: Suppress warnings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=57ccb6fd6b935a0bd41bc95df57ec037443da65d;p=simgear.git Suppress warnings --- diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index b5bf8a2d..93c95682 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -836,7 +836,7 @@ public: /** * Get the number of child nodes. */ - int nChildren () const { return _children.size(); } + int nChildren () const { return (int)_children.size(); } /** @@ -1568,7 +1568,7 @@ public: /** * Get the number of listeners. */ - int nListeners () const { return _listeners ? _listeners->size() : 0; } + int nListeners () const { return _listeners ? (int)_listeners->size() : 0; } /** diff --git a/simgear/scene/material/Technique.cxx b/simgear/scene/material/Technique.cxx index b8ceaa59..4c1dbe16 100644 --- a/simgear/scene/material/Technique.cxx +++ b/simgear/scene/material/Technique.cxx @@ -192,7 +192,7 @@ void Technique::releaseGLObjects(osg::State* state) const pass->releaseGLObjects(state); } if (state == 0) { - for (int i = 0; i < _contextMap.size(); ++i) { + for (int i = 0; i < (int)_contextMap.size(); ++i) { ContextInfo& info = _contextMap[i]; Status oldVal = info.valid(); info.valid.compareAndSwap(oldVal, UNKNOWN); @@ -314,7 +314,7 @@ void Technique::setGLExtensionsPred(float glVersion, void Technique::refreshValidity() { - for (int i = 0; i < _contextMap.size(); ++i) { + for (int i = 0; i < (int)_contextMap.size(); ++i) { ContextInfo& info = _contextMap[i]; Status oldVal = info.valid(); // What happens if we lose the race here? diff --git a/simgear/structure/SGExpression.hxx b/simgear/structure/SGExpression.hxx index 1589aab1..05fc8336 100644 --- a/simgear/structure/SGExpression.hxx +++ b/simgear/structure/SGExpression.hxx @@ -1202,7 +1202,7 @@ namespace simgear void eval(bool& value, const expression::Binding* b) const { value = false; - for (int i = 0; i < getNumOperands(); ++i) { + for (int i = 0; i < (int)getNumOperands(); ++i) { value = value || getOperand(i)->getValue(b); if (value) return; @@ -1216,7 +1216,7 @@ namespace simgear void eval(bool& value, const expression::Binding* b) const { value = true; - for (int i = 0; i < getNumOperands(); ++i) { + for (int i = 0; i < (int)getNumOperands(); ++i) { value = value && getOperand(i)->getValue(b); if (!value) return;