Skip to content
Snippets Groups Projects
Commit 23491f89 authored by Amorilia's avatar Amorilia
Browse files

Merge branch 'obse-internal-type-number'

parents 8eeca2c4 6309afd6
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,10 @@ public:
NIFLIB_API bool operator<( const Type & compare_to ) const;
NIFLIB_API NiObject * Create() const;
const Type * base_type;
const int internal_type_number;
private:
string name;
static int num_types;
};
}
......
......@@ -5,7 +5,9 @@ All rights reserved. Please see niflib.h for license. */
#include "../include/ObjectRegistry.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