diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 13:35:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 16:13:46 +0200 |
commit | 939dff83ba8bc2dd124a73cc5460e52b8a642d9f (patch) | |
tree | 11a60d79de6080b7db6e6983e7f8fab0ad05e029 | |
parent | 99059a1ececa3621c2fe46fabdd79eed9d626c42 (diff) |
no need to do this dynamic_cast in a release build
just make it an assert
Change-Id: I6cd84c9988a3d5111d24b44aae46dc6d69ca06ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121813
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/filter/ww8/writerhelper.hxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 9ad16d0c2f14..91b881eaf57c 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -224,8 +224,7 @@ namespace sw */ template<class T> const T & item_cast(const SfxPoolItem &rItem) { - if (dynamic_cast<const T *>(&rItem) == nullptr) - throw std::bad_cast(); + assert(dynamic_cast<const T *>(&rItem) && "bad type cast"); return static_cast<const T &>(rItem); } |