aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Cheng <kevin.cheng@arm.com>2021-11-06 01:24:24 +0000
committerKevin Cheng <kevin.cheng@arm.com>2021-11-06 01:25:03 +0000
commit55b363b7119797d46080d901ddf06d4e58c94546 (patch)
tree5e10910a6727811bf14e06bfcfa9be35487a0d2c
parent87de41f7e0f74c8ad763297367ad79497280ea82 (diff)
downloadserialization_lib-55b363b7119797d46080d901ddf06d4e58c94546.tar.gz
Avoid RTTI usage
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I89faef7fea11b19b6c59fda1b271e9b2af95b372
-rw-r--r--include/attribute.h2
-rw-r--r--include/quant_info.h5
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<const Tosa##NAME##Attribute*>(options); \
+ const Tosa##NAME##Attribute* p = static_cast<const Tosa##NAME##Attribute*>(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<const Tosa##NAME##QuantInfo*>(qinfo); \
- assert(p); \
- *this = *p; \
+ const Tosa##NAME##QuantInfo* p = static_cast<const Tosa##NAME##QuantInfo*>(qinfo); \
+ *this = *p; \
} \
Tosa##NAME##QuantInfo(const Tosa##NAME##QuantInfo* p) \
{ \