Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Template Specialization Subtypes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Jason Goepel   Members   -  Reputation: 405

Like
0Likes
Like

Posted 30 April 2014 - 12:02 PM

as_objecttype.cpp(369): 

// interface
int asCObjectType::GetSubTypeId(asUINT subtypeIndex) const
{
    if( flags & asOBJ_TEMPLATE )
    {
        if( subtypeIndex >= templateSubTypes.GetLength() )
            return asINVALID_ARG;

        return engine->GetTypeIdFromDataType(templateSubTypes[subtypeIndex]);
    }

    // Only template types have sub types
    return asERROR;
}

If the type is a specialization of a template, the asOBJ_TEMPLATE flag is not set

http://www.angelcode.com/angelscript/sdk/docs/manual/doc_adv_template.html#doc_adv_template_2

 

The templateSubTypes array does have elements though.  Should the search through that array really be guarded by asOBJ_TEMPLATE?

 



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3304

Like
0Likes
Like

Posted 01 May 2014 - 09:17 AM

I'll look into it. Thanks for bringing it up.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Andreas Jonsson   Moderators   -  Reputation: 3304

Like
0Likes
Like

Posted 17 May 2014 - 04:52 PM

I've corrected this in revision 1928.

 

Thanks,

Andreas


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#4 Jason Goepel   Members   -  Reputation: 405

Like
0Likes
Like

Posted 19 May 2014 - 06:06 AM

Is there a reason you did change asCObjectType::GetSubType as well?



#5 Andreas Jonsson   Moderators   -  Reputation: 3304

Like
0Likes
Like

Posted 19 May 2014 - 07:11 AM

No reason. I just forgot about it :)


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS