summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-09-23 19:16:19 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-09-23 19:22:59 +0100
commite74ce258681be7c3043506376173205c2861eac3 (patch)
treee2ed427e63e87cfc91ecb9ca336ecbbf9dcd46d1
parentRemove unnecessary casts (diff)
downloadslicer-e74ce258681be7c3043506376173205c2861eac3.tar.bz2
slicer-e74ce258681be7c3043506376173205c2861eac3.tar.xz
slicer-e74ce258681be7c3043506376173205c2861eac3.zip
Remove old style casts
-rw-r--r--Jamroot.jam1
-rw-r--r--slicer/ice/serializer.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index 1ef5751..ff4eea1 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -18,6 +18,7 @@ project
<variant>debug:<warnings>extra
<variant>debug:<warnings-as-errors>on
<variant>debug:<cflags>-Wnon-virtual-dtor
+ <variant>debug:<cflags>-Wold-style-cast
<variant>debug:<cflags>-Woverloaded-virtual
<toolset>gcc,<variant>debug:<cflags>-Wuseless-cast
<variant>coverage:<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<const char *>(blob.data()), blob.size());
}
IceBlobDeserializer::IceBlobDeserializer(const Ice::ByteSeq & b) : refblob(b) { }