From 54ad634c4e60e3b4adc9d8f05973c96563ea34fc Mon Sep 17 00:00:00 2001
From: Amorilia <amorilia@users.sourceforge.net>
Date: Tue, 16 May 2006 22:36:14 +0000
Subject: [PATCH] Make things compile under linux GCC.

---
 NIF_IO.h   | 4 ++--
 nif_math.h | 1 +
 niflib.cpp | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/NIF_IO.h b/NIF_IO.h
index 7ed18015..ca8d5f33 100644
--- a/NIF_IO.h
+++ b/NIF_IO.h
@@ -440,7 +440,7 @@ void NifStream( vector<T> const & val, ostream& file, uint version = 0 ) {
 
 template <class T>
 void NifStream( vector<Key<T> > & val, istream& file, uint version, uint attr_arg ) {
-	vector<Key<T> >::iterator it;
+	typename vector<Key<T> >::iterator it;
 	for ( it = val.begin(); it != val.end(); ++it ) {
 		NifStream( *it, file, version, attr_arg );
 	}
@@ -448,7 +448,7 @@ void NifStream( vector<Key<T> > & val, istream& file, uint version, uint attr_ar
 
 template <class T>
 void NifStream( vector<Key<T> > const & val, ostream& file, uint version, uint attr_arg ) {
-	vector<Key<T> >::const_iterator it;
+	typename vector<Key<T> >::const_iterator it;
 	for ( it = val.begin(); it != val.end(); ++it ) {
 		NifStream( *it, file, version, attr_arg );
 	}
diff --git a/nif_math.h b/nif_math.h
index 70575852..2397d930 100644
--- a/nif_math.h
+++ b/nif_math.h
@@ -36,6 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. */
 
 #include <cmath>
 #include <iostream>
+#include <stdexcept>
 
 using namespace std;
 
diff --git a/niflib.cpp b/niflib.cpp
index 679358c3..acd799a4 100644
--- a/niflib.cpp
+++ b/niflib.cpp
@@ -814,7 +814,7 @@ void MergeSceneGraph( map<string,NiAVObjectRef> & name_map, const NiAVObjectRef
 		//par_par->GetAttr("Children")->RemoveLinks( par );
 
 		//Get the block to attatch to
-		NiObjectRef attatch = name_map[par_par->name];
+		NiObjectRef attatch = DynamicCast<NiObject>(name_map[par_par->name]);
 
 		//TODO:  Implement children
 		////Add this block as new child
-- 
GitLab