diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-24 10:44:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-24 13:43:09 +0100 |
commit | 03c870dfc6aa140354613b0c179fb7bec2e74a73 (patch) | |
tree | 109b1ba04edcf80ddbe3a55b06b1e89c0a7190d6 /unoidl | |
parent | 109c9e9fa5ffe55bd672c99c3cdb741aac1060eb (diff) |
coverity#1242422 Unchecked dynamic_cast
Change-Id: If5e8b90f32c167bafeb3649f4bc6c31198635947
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/sourcefileprovider.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/unoidl/source/sourcefileprovider.cxx b/unoidl/source/sourcefileprovider.cxx index 3348d1c5e8e0..c73142dc83e3 100644 --- a/unoidl/source/sourcefileprovider.cxx +++ b/unoidl/source/sourcefileprovider.cxx @@ -100,9 +100,8 @@ SourceFileProvider::SourceFileProvider( if (k == map->end()) { k = map->insert(std::make_pair(id, new Module)).first; } - Module * mod = dynamic_cast< Module * >(k->second.get()); - assert(mod != 0); - map = &mod->map; + Module& mod = dynamic_cast<Module&>(*k->second.get()); + map = &mod.map; } } } |