From f8933e852daa697fcff7f44aaa4ec2814c178994 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Oct 2021 15:43:26 +0100 Subject: Apply clang-tidy recommendations --- slicer/db/testConversions.cpp | 2 +- slicer/slicer/modelParts.cpp | 2 +- slicer/test/conversions.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slicer/db/testConversions.cpp b/slicer/db/testConversions.cpp index 2c1e482..f957150 100644 --- a/slicer/db/testConversions.cpp +++ b/slicer/db/testConversions.cpp @@ -21,6 +21,6 @@ namespace Slicer { boost::posix_time::time_duration timespanToTimeduration(const ::TestDatabase::TimespanPtr & ts) { - return boost::posix_time::time_duration((ts->days * 24) + ts->hours, ts->minutes, ts->seconds); + return boost::posix_time::time_duration {(ts->days * 24) + ts->hours, ts->minutes, ts->seconds}; } } diff --git a/slicer/slicer/modelParts.cpp b/slicer/slicer/modelParts.cpp index 83c65c5..7a31b05 100644 --- a/slicer/slicer/modelParts.cpp +++ b/slicer/slicer/modelParts.cpp @@ -20,7 +20,7 @@ namespace Slicer { TypeId ModelPart::GetTypeId() const { - return TypeId(); + return {}; } std::optional diff --git a/slicer/test/conversions.cpp b/slicer/test/conversions.cpp index f34c467..6e74e26 100644 --- a/slicer/test/conversions.cpp +++ b/slicer/test/conversions.cpp @@ -24,8 +24,8 @@ namespace Slicer { boost::posix_time::ptime dateTimeToPTime(const ::TestModule::DateTime & dt) { - return boost::posix_time::ptime(boost::gregorian::date(USHORT(dt.year), USHORT(dt.month), USHORT(dt.day)), - boost::posix_time::time_duration(dt.hour, dt.minute, dt.second)); + return boost::posix_time::ptime {boost::gregorian::date(USHORT(dt.year), USHORT(dt.month), USHORT(dt.day)), + boost::posix_time::time_duration(dt.hour, dt.minute, dt.second)}; } DLL_PUBLIC @@ -118,7 +118,7 @@ namespace Slicer { int2str(const Ice::optional & i) { if (!i) { - return std::string(); + return {}; } return std::to_string(*i); } -- cgit v1.2.3