@@ -35,8 +35,6 @@ namespace rtl::detail
3535
3636 private:
3737
38- static std::vector<traits::ConverterPair> m_conversions;
39-
4038 mutable bool m_isWrappingConst;
4139 mutable bool m_isConstCastSafe;
4240
@@ -47,8 +45,6 @@ namespace rtl::detail
4745 mutable std::size_t m_typeId;
4846 mutable std::size_t m_wrapperTypeId;
4947
50- const std::vector<traits::ConverterPair>& m_converters;
51-
5248 RObjectId (RObjectId&&) = default ;
5349 RObjectId (const RObjectId&) = default ;
5450 RObjectId& operator =(RObjectId&&) = delete ;
@@ -63,20 +59,18 @@ namespace rtl::detail
6359 , m_containsAs(EntityKind::None)
6460 , m_typeId(TypeId<>::None)
6561 , m_wrapperTypeId(TypeId<>::None)
66- , m_converters(m_conversions)
6762 { }
6863
6964
7065 RObjectId (alloc pAllocOn, bool pIsConstCastSafe, Wrapper pWrapperType, bool pIsStoredConst, EntityKind pContainsAs,
71- std::size_t pTypeId, const std::vector<traits::ConverterPair>& pConverters, std::size_t pWrapperTypeId)
66+ std::size_t pTypeId, std::size_t pWrapperTypeId)
7267 : m_isWrappingConst(pIsStoredConst)
7368 , m_isConstCastSafe(pIsConstCastSafe)
7469 , m_allocatedOn(pAllocOn)
7570 , m_wrapperType(pWrapperType)
7671 , m_containsAs(pContainsAs)
7772 , m_typeId(pTypeId)
7873 , m_wrapperTypeId(pWrapperTypeId)
79- , m_converters(pConverters)
8074 { }
8175
8276
@@ -92,19 +86,6 @@ namespace rtl::detail
9286 }
9387
9488
95- inline std::size_t getConverterIndex (const std::size_t pToTypeId) const
96- {
97- if (m_containsAs != EntityKind::None) {
98- for (std::size_t index = 0 ; index < m_converters.size (); index++) {
99- if (m_converters[index].first == pToTypeId) {
100- return index;
101- }
102- }
103- }
104- return index_none;
105- }
106-
107-
10889 template <class T >
10990 static constexpr EntityKind getEntityKind ()
11091 {
@@ -136,10 +117,9 @@ namespace rtl::detail
136117
137118 const std::size_t wrapperId = _W::id ();
138119 const std::size_t typeId = rtl::detail::TypeId<_T>::get ();
139- const auto & conversions = rtl::detail::ReflectCast<_T>::getConversions ();
140120 const bool isWrappingConst = (_W::type != Wrapper::None && traits::is_const_v<typename _W::value_type>);
141121 return RObjectId (_allocOn, pIsConstCastSafe, _W::type,
142- isWrappingConst, containedAs, typeId, conversions, wrapperId);
122+ isWrappingConst, containedAs, typeId, wrapperId);
143123 }
144124 };
145125}
0 commit comments