INPparseNumMod(), #7/14, use 'lastType' instead of the identical 'cardType'
there is no further access to cardType thus can drop the reduntandant assignments to cardType
This commit is contained in:
parent
110f16b361
commit
1a9bcf6b33
|
|
@ -380,16 +380,16 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
|
||||||
/* FALL THRU when continuing a card */
|
/* FALL THRU when continuing a card */
|
||||||
default:
|
default:
|
||||||
lastType = cardType;
|
lastType = cardType;
|
||||||
if (cardType == E_MISSING) {
|
// cardType is not used downwards from here
|
||||||
|
if (lastType == E_MISSING) {
|
||||||
/* new command card */
|
/* new command card */
|
||||||
if (cardName) FREE(cardName); /* get rid of old card name */
|
if (cardName) FREE(cardName); /* get rid of old card name */
|
||||||
INPgetTok(&line,&cardName,1); /* get new card name */
|
INPgetTok(&line,&cardName,1); /* get new card name */
|
||||||
if (*cardName) { /* Found a name? */
|
if (*cardName) { /* Found a name? */
|
||||||
cardType = INPfindCard(cardName,INPcardTab,INPnumCards);
|
lastType = INPfindCard(cardName,INPcardTab,INPnumCards);
|
||||||
lastType = cardType;
|
if (lastType >= 0) {
|
||||||
if (cardType >= 0) {
|
|
||||||
/* Add card structure to model */
|
/* Add card structure to model */
|
||||||
info = INPcardTab[cardType];
|
info = INPcardTab[lastType];
|
||||||
error = info->newCard (&tmpCard, model->INPmodfast );
|
error = info->newCard (&tmpCard, model->INPmodfast );
|
||||||
if (error) return(error);
|
if (error) return(error);
|
||||||
/* Handle parameter-less cards */
|
/* Handle parameter-less cards */
|
||||||
|
|
@ -409,7 +409,6 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cardType is not used downwards from here
|
|
||||||
if (lastType >= 0) { /* parse the rest of this line */
|
if (lastType >= 0) { /* parse the rest of this line */
|
||||||
while (*line) {
|
while (*line) {
|
||||||
/* Strip leading carat from booleans */
|
/* Strip leading carat from booleans */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue