| 356 | |
| 357 | |
| 358 | static bool CastExpressionElementValue( ExpressionValueElement& value, int from, int to ) |
| 359 | { |
| 360 | if( from == to ) |
| 361 | { |
| 362 | return true; |
| 363 | } |
| 364 | switch( from ) |
| 365 | { |
| 366 | case OP_INT: |
| 367 | switch( to ) |
| 368 | { |
| 369 | case OP_FLOAT: |
| 370 | value.floatValue = double( value.intValue ); |
| 371 | return true; |
| 372 | } |
| 373 | return false; |
| 374 | case OP_FLOAT: |
| 375 | switch( to ) |
| 376 | { |
| 377 | case OP_INT: |
| 378 | value.intValue = int( value.floatValue ); |
| 379 | return true; |
| 380 | } |
| 381 | return false; |
| 382 | } |
| 383 | return false; |
| 384 | } |
| 385 | |
| 386 | bool CastExpressionValue( ExpressionValue& value, const Type& from, const Type& to ) |
| 387 | { |
no outgoing calls
no test coverage detected