Attachments (1)
Change History (6)
by , 11 years ago
Attachment: | 0001-Fix-coverity-CID-611220-unchecked-dynamic_cast.patch added |
---|
comment:1 by , 11 years ago
patch: | 0 → 1 |
---|
comment:2 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
Shouldn't it be changed to use `static_cast' instead, then?
Version 0, edited 11 years ago by (next)
comment:4 by , 11 years ago
Not necessarily, bear in mind dynamic_cast isn't only for checking type validity ; depending on the structure of the classes in question and the inheritance hierarchy involved, it may also adjust the 'this' pointer in the process, so it's not interchangeable with static_cast except in simple cases.
Note:
See TracTickets
for help on using tickets.
This is a case where Coverity is technically correct, but not practically. The check for TYPE_ENUMERATION already accomplishes the same thing.