diff options
-rw-r--r-- | src/TMstate.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/TMstate.c b/src/TMstate.c index e9edbd4..406dfc4 100644 --- a/src/TMstate.c +++ b/src/TMstate.c @@ -103,8 +103,8 @@ GetBranchHead(TMParseStateTree parseTree, TMShortCard modIndex, Boolean isDummy) { -#define TM_BRANCH_HEAD_TBL_ALLOC 8 -#define TM_BRANCH_HEAD_TBL_REALLOC 8 +#define TM_BRANCH_HEAD_TBL_ALLOC ((TMShortCard) 8) +#define TM_BRANCH_HEAD_TBL_REALLOC ((TMShortCard) 8) TMBranchHead branchHead = parseTree->branchHeadTbl; @@ -126,13 +126,9 @@ GetBranchHead(TMParseStateTree parseTree, TMShortCard newSize; if (parseTree->branchHeadTblSize == 0) - parseTree->branchHeadTblSize = - (TMShortCard) (parseTree->branchHeadTblSize + - TM_BRANCH_HEAD_TBL_ALLOC); + parseTree->branchHeadTblSize = TM_BRANCH_HEAD_TBL_ALLOC; else - parseTree->branchHeadTblSize = - (TMShortCard) (parseTree->branchHeadTblSize + - TM_BRANCH_HEAD_TBL_REALLOC); + parseTree->branchHeadTblSize += TM_BRANCH_HEAD_TBL_REALLOC; newSize = (TMShortCard) (parseTree->branchHeadTblSize * sizeof(TMBranchHeadRec)); @@ -168,8 +164,8 @@ GetBranchHead(TMParseStateTree parseTree, TMShortCard _XtGetQuarkIndex(TMParseStateTree parseTree, XrmQuark quark) { -#define TM_QUARK_TBL_ALLOC 16 -#define TM_QUARK_TBL_REALLOC 16 +#define TM_QUARK_TBL_ALLOC ((TMShortCard) 16) +#define TM_QUARK_TBL_REALLOC ((TMShortCard) 16) TMShortCard i; for (i = 0; i < parseTree->numQuarks; i++) @@ -181,13 +177,9 @@ _XtGetQuarkIndex(TMParseStateTree parseTree, XrmQuark quark) TMShortCard newSize; if (parseTree->quarkTblSize == 0) - parseTree->quarkTblSize = - (TMShortCard) (parseTree->quarkTblSize + - TM_QUARK_TBL_ALLOC); + parseTree->quarkTblSize = TM_QUARK_TBL_ALLOC; else - parseTree->quarkTblSize = - (TMShortCard) (parseTree->quarkTblSize + - TM_QUARK_TBL_REALLOC); + parseTree->quarkTblSize += TM_QUARK_TBL_REALLOC; newSize = (TMShortCard) (parseTree->quarkTblSize * sizeof(XrmQuark)); |