From e74ce258681be7c3043506376173205c2861eac3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 23 Sep 2021 19:16:19 +0100 Subject: Remove old style casts --- Jamroot.jam | 1 + slicer/ice/serializer.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jamroot.jam b/Jamroot.jam index 1ef5751..ff4eea1 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -18,6 +18,7 @@ project debug:extra debug:on debug:-Wnon-virtual-dtor + debug:-Wold-style-cast debug:-Woverloaded-virtual gcc,debug:-Wuseless-cast coverage:on diff --git a/slicer/ice/serializer.cpp b/slicer/ice/serializer.cpp index a7a4eb9..fdd8409 100644 --- a/slicer/ice/serializer.cpp +++ b/slicer/ice/serializer.cpp @@ -30,7 +30,7 @@ namespace Slicer { IceStreamSerializer::Serialize(ModelPartForRootPtr mp) { IceBlobSerializer::Serialize(mp); - strm.write((const char *)&blob.front(), blob.size()); + strm.write(reinterpret_cast(blob.data()), blob.size()); } IceBlobDeserializer::IceBlobDeserializer(const Ice::ByteSeq & b) : refblob(b) { } -- cgit v1.2.3