diff --git a/include/etl/byte_stream.h b/include/etl/byte_stream.h index d2443bfa..138ee19b 100644 --- a/include/etl/byte_stream.h +++ b/include/etl/byte_stream.h @@ -303,7 +303,7 @@ namespace etl //*************************************************************************** size_t size_bytes() const { - return etl::distance(pdata, static_cast(pcurrent)); + return etl::distance(pdata, pcurrent); } //*************************************************************************** @@ -689,7 +689,7 @@ namespace etl template size_t available() const { - size_t used = etl::distance(pdata, reinterpret_cast(pcurrent)); + size_t used = etl::distance(pdata, pcurrent); return (length - used) / sizeof(T); }