diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-10-17 15:43:26 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-10-17 16:28:39 +0100 |
commit | f8933e852daa697fcff7f44aaa4ec2814c178994 (patch) | |
tree | 97aa8b1adb874abde188c2ea807a4b774b512714 | |
parent | Exclude common.o from checks (diff) | |
download | slicer-f8933e852daa697fcff7f44aaa4ec2814c178994.tar.bz2 slicer-f8933e852daa697fcff7f44aaa4ec2814c178994.tar.xz slicer-f8933e852daa697fcff7f44aaa4ec2814c178994.zip |
Apply clang-tidy recommendations
-rw-r--r-- | slicer/db/testConversions.cpp | 2 | ||||
-rw-r--r-- | slicer/slicer/modelParts.cpp | 2 | ||||
-rw-r--r-- | 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<std::string> 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<Ice::Int> & i) { if (!i) { - return std::string(); + return {}; } return std::to_string(*i); } |