]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/Technique.cxx
Merge branch 'frohlich/weak' into next
[simgear.git] / simgear / scene / material / Technique.cxx
index c3f6b45505f5c4d77066c5a610611582fed8e6d7..4c1dbe169c3a6f0eef2f5009fe168ccdcc086f87 100644 (file)
@@ -1,9 +1,15 @@
+
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include "Technique.hxx"
 #include "Pass.hxx"
 
 #include <boost/bind.hpp>
 #include <boost/foreach.hpp>
 
+#include <iterator>
 #include <vector>
 #include <string>
 
@@ -60,7 +66,7 @@ Technique::Technique(const Technique& rhs, const osg::CopyOp& copyop) :
     using namespace std;
     using namespace boost;
     transform(rhs.passes.begin(), rhs.passes.end(),
-              backRefInsertIterator(passes),
+              back_inserter(passes),
               bind(simgear::clone_ref<Pass>, _1, copyop));
 
 }
@@ -186,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);
@@ -308,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?