Remove byte-reinterpret conversion operator from vector_ref

This commit is contained in:
Jason Cobb 2020-03-15 18:38:13 -04:00
parent 362c2175bf
commit 4fcc33c5e5
No known key found for this signature in database
GPG Key ID: 2A3F6A6DCA1E8DED

View File

@ -44,7 +44,6 @@ public:
std::vector<unsigned char> toBytes() const { return std::vector<unsigned char>(reinterpret_cast<unsigned char const*>(m_data), reinterpret_cast<unsigned char const*>(m_data) + m_count * sizeof(T)); }
std::string toString() const { return std::string((char const*)m_data, ((char const*)m_data) + m_count * sizeof(T)); }
template <class T2> explicit operator vector_ref<T2>() const { assert(m_count * sizeof(T) / sizeof(T2) * sizeof(T2) / sizeof(T) == m_count); return vector_ref<T2>(reinterpret_cast<T2*>(m_data), m_count * sizeof(T) / sizeof(T2)); }
operator vector_ref<T const>() const { return vector_ref<T const>(m_data, m_count); }
T* data() const { return m_data; }