- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.cc
reddb399 r98278b3a 275 275 // xxx - not positive this is correct, but appears to allow casting int => enum 276 276 cost = Cost::unsafe; 277 } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) { 278 cost = Cost::unsafe; 279 } // if 277 } // if 278 // no cases for zero_t/one_t because it should not be possible to convert int, etc. to zero_t/one_t. 280 279 } 281 280 … … 309 308 // assignResult == 0 means Cost::Infinity 310 309 } // if 311 } else if ( dynamic_cast< ZeroType * >( dest ) ) { 312 cost = Cost::unsafe; 310 // case case for zero_t because it should not be possible to convert pointers to zero_t. 313 311 } // if 314 312 }
Note:
See TracChangeset
for help on using the changeset viewer.