diff --git a/NIF_IO.h b/NIF_IO.h index 74b6ac23e61c872d3872859e6063bc07f99f6f06..eaa6753845d10fcf54097dce2df549f1a333e81b 100644 --- a/NIF_IO.h +++ b/NIF_IO.h @@ -235,13 +235,10 @@ void NifStream( Key<T> & key, ifstream& file, KeyType type ) { template <class T> void NifStream( vector<T> & val, ifstream& file ) { - //vector<T>::iterator it; - //for ( it = val.begin(); it != val.end(); ++it ) { - // NifStream( *it, file ); - //} - for ( int i = 0; i < val.size(); i++) { - NifStream( val[i], file ); - }; + typename vector<T>::iterator it; + for ( it = val.begin(); it != val.end(); ++it ) { + NifStream( *it, file ); + } } @@ -307,13 +304,10 @@ void NifStream( Key<T> & key, ofstream& file, KeyType type ) { template <class T> void NifStream( vector<T> & val, ofstream& file ) { - //vector<T>::iterator it; - //for ( it = val.begin(); it != val.end(); ++it ) { - // NifStream( *it, file ); - //} - for ( int i = 0; i < val.size(); i++) { - NifStream( val[i], file ); - }; + typename vector<T>::iterator it; + for ( it = val.begin(); it != val.end(); ++it ) { + NifStream( *it, file ); + } } class NIF; diff --git a/niflib.cpp b/niflib.cpp index 633694478b43e4cf58679d72e9fd771ccc214cc9..d2067708b9988fb65edf54c238d4189c38f209c4 100644 --- a/niflib.cpp +++ b/niflib.cpp @@ -148,7 +148,6 @@ vector<blk_ref> ReadNifList( string file_name ) { } uint unknownInt2 = ReadUInt( in ); - //uint unknownInt3 = ReadUInt( in ); ////Output //cout << endl << endl