Fix assignment to static class members const issue.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5648 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4beaf0e0c8
commit
d0b7519242
1 changed files with 6 additions and 2 deletions
|
@ -5535,7 +5535,7 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (isvirt|isnonvirt)
|
||||
if (isvirt||isnonvirt)
|
||||
QCC_Error(ERR_INTERNAL, "virtual keyword on member that is not a function");
|
||||
}
|
||||
|
||||
|
@ -5672,8 +5672,12 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
|||
//static members are technically just funny-named globals, and do not generate fields.
|
||||
if (isnonvirt || isstatic || (newparm->type == ev_function && !arraysize))
|
||||
{
|
||||
unsigned int fl = 0;
|
||||
if (newparm->type == ev_function && !arraysize)
|
||||
fl = GDF_CONST;
|
||||
|
||||
QC_snprintfz(membername, sizeof(membername), "%s::%s", classname, parmname);
|
||||
QCC_FreeDef(QCC_PR_GetDef(newparm, membername, NULL, true, 0, GDF_CONST));
|
||||
QCC_FreeDef(QCC_PR_GetDef(newparm, membername, NULL, true, 0, fl));
|
||||
|
||||
if (isnonvirt || isstatic)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue