From 55b363b7119797d46080d901ddf06d4e58c94546 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Sat, 6 Nov 2021 01:24:24 +0000 Subject: Avoid RTTI usage Signed-off-by: Kevin Cheng Change-Id: I89faef7fea11b19b6c59fda1b271e9b2af95b372 --- include/attribute.h | 2 +- include/quant_info.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/attribute.h b/include/attribute.h index ff354cb..93f7bc4 100644 --- a/include/attribute.h +++ b/include/attribute.h @@ -116,7 +116,7 @@ public: public: \ Tosa##NAME##Attribute(const TosaAttributeBase* options) \ { \ - const Tosa##NAME##Attribute* p = reinterpret_cast(options); \ + const Tosa##NAME##Attribute* p = static_cast(options); \ *this = *p; \ } \ Tosa##NAME##Attribute(const Tosa##NAME##Attribute* p) \ diff --git a/include/quant_info.h b/include/quant_info.h index d83063d..c7daeb2 100644 --- a/include/quant_info.h +++ b/include/quant_info.h @@ -107,9 +107,8 @@ public: public: \ Tosa##NAME##QuantInfo(const TosaQuantInfoBase* qinfo) \ { \ - const Tosa##NAME##QuantInfo* p = dynamic_cast(qinfo); \ - assert(p); \ - *this = *p; \ + const Tosa##NAME##QuantInfo* p = static_cast(qinfo); \ + *this = *p; \ } \ Tosa##NAME##QuantInfo(const Tosa##NAME##QuantInfo* p) \ { \ -- cgit v1.2.1