mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix forcetype for template instantiations
This commit is contained in:
parent
2941d95466
commit
882b544805
@ -34,6 +34,10 @@ CPPType(const CPPFile &file) :
|
||||
CPPDeclaration(file)
|
||||
{
|
||||
_declaration = (CPPTypeDeclaration *)NULL;
|
||||
|
||||
// This is set true by interrogate when the "forcetype" keyword is
|
||||
// used.
|
||||
_forcetype = false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
static string get_preferred_name_for(const CPPType *type);
|
||||
|
||||
CPPTypeDeclaration *_declaration;
|
||||
bool _forcetype;
|
||||
|
||||
protected:
|
||||
typedef set<CPPType *, CPPTypeCompare> Types;
|
||||
|
@ -145,6 +145,7 @@ do_command(const string &command, const string ¶ms) {
|
||||
nout << "Unknown type: forcetype " << params << "\n";
|
||||
} else {
|
||||
type = type->resolve_type(&parser, &parser);
|
||||
type->_forcetype = true;
|
||||
_forcetype.insert(type->get_local_name(&parser));
|
||||
}
|
||||
|
||||
|
@ -1704,11 +1704,15 @@ bool TypeManager::IsLocal(CPPType *in_type)
|
||||
// A local means it was compiled in this scope of work..
|
||||
// IE a should actualy generate code for this objects....
|
||||
CPPType *base_type = resolve_type(unwrap(in_type));
|
||||
if (base_type->_forcetype) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(base_type->_file._source == CPPFile::S_local && !base_type->is_incomplete())
|
||||
return true;
|
||||
if (base_type->_file._source == CPPFile::S_local && !base_type->is_incomplete()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
|
||||
/*
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user