Skip to content
Snippets Groups Projects
Commit 6309afd6 authored by Amorilia's avatar Amorilia
Browse files

Simple implementation of internal type number.

parent 62d881db
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,10 @@ public:
NIFLIB_API bool IsDerivedType ( const Type & compare_to ) const;
NIFLIB_API bool operator<( const Type & compare_to ) const;
const Type * base_type;
const int internal_type_number;
private:
string name;
static int num_types;
};
}
......
......@@ -4,7 +4,9 @@ All rights reserved. Please see niflib.h for license. */
#include "../include/Type.h"
using namespace Niflib;
Type::Type (const string & type_name, const Type * par_type ) : name(type_name), base_type(par_type) {}
int Type::num_types = 0;
Type::Type (const string & type_name, const Type * par_type ) : name(type_name), base_type(par_type), internal_type_number(num_types++) {}
Type::~Type() {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment