]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/props.cxx
MSVC++ bug work-around from Frederic Bouvier.
[simgear.git] / simgear / misc / props.cxx
index cb721d34ce4787d8f73e7e67a44acabe7240dd49..6b8ce67753b4e25034d2a74d16acdbd3a8ba608e 100644 (file)
@@ -19,6 +19,7 @@ using std::cerr;
 using std::endl;
 using std::find;
 using std::sort;
+using std::vector;
 
 #else
 
@@ -26,6 +27,15 @@ using std::sort;
 #include <simgear/debug/logstream.hxx>
 
 SG_USING_STD(sort);
+SG_USING_STD(find);
+SG_USING_STD(vector);
+
+#ifdef _MSC_VER
+// MSVC is buggy, and needs something strange here
+SG_USING_STD(vector<SGPropertyNode_ptr>);
+SG_USING_STD(vector<SGPropertyChangeListener *>);
+SG_USING_STD(vector<SGPropertyNode *>);
+#endif
 
 #endif
 
@@ -844,7 +854,7 @@ SGPropertyNode::getChild (const char * name, int index, bool create)
     SGPropertyNode_ptr node;
     pos = find_child(name, index, _removedChildren);
     if (pos >= 0) {
-      std::vector<SGPropertyNode_ptr>::iterator it = _removedChildren.begin();
+      vector<SGPropertyNode_ptr>::iterator it = _removedChildren.begin();
       it += pos;
       node = _removedChildren[pos];
       _removedChildren.erase(it);
@@ -902,7 +912,7 @@ SGPropertyNode::removeChild (const char * name, int index, bool keep)
   SGPropertyNode_ptr ret;
   int pos = find_child(name, index, _children);
   if (pos >= 0) {
-    std::vector<SGPropertyNode_ptr>::iterator it = _children.begin();
+    vector<SGPropertyNode_ptr>::iterator it = _children.begin();
     it += pos;
     SGPropertyNode_ptr node = _children[pos];
     _children.erase(it);