Assume mm if units not given in DRC rules.

This keeps us from internalizing them as nm which appear to have
no effect (at least visually).
This commit is contained in:
Jeff Young 2020-07-22 15:11:00 +01:00
parent 864087890b
commit 637571e0be
1 changed files with 4 additions and 4 deletions

View File

@ -723,18 +723,18 @@ bool COMPILER::generateUCode( UCODE* aCode )
case TR_NUMBER:
{
int units = 1;
TREE_NODE* son = node->leaf[0];
double value = atof( node->value.str ); // fixme: locale
if( son && son->op == TR_UNIT )
{
//printf( "HandleUnit: %s unit %d\n", node->value.str, son->value.type );
value = m_unitResolver->Convert( node->value.str, son->value.type );
units = son->value.type;
visitedNodes.insert( son );
}
double value = m_unitResolver->Convert( node->value.str, units );
node->uop = makeUop( TR_UOP_PUSH_VALUE, value );
node->isTerminal = true;