summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 13:35:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 16:13:46 +0200
commit939dff83ba8bc2dd124a73cc5460e52b8a642d9f (patch)
tree11a60d79de6080b7db6e6983e7f8fab0ad05e029
parent99059a1ececa3621c2fe46fabdd79eed9d626c42 (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.hxx3
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);
}