From 3b608307c88f902df4fcaf559391640dbbbf5e5c Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 18 Sep 2019 08:00:58 +0200 Subject: [PATCH 1/8] prefer prefix ++/-- operators for non-primitive types --- contrib/gtest/test/gtest-param-test_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/gtest/test/gtest-param-test_test.cc b/contrib/gtest/test/gtest-param-test_test.cc index 7762403e6..857f6c5e5 100644 --- a/contrib/gtest/test/gtest-param-test_test.cc +++ b/contrib/gtest/test/gtest-param-test_test.cc @@ -141,7 +141,7 @@ void VerifyGenerator(const ParamGenerator& generator, << ", expected_values[i] is " << PrintValue(expected_values[i]) << ", *it is " << PrintValue(*it) << ", and 'it' is an iterator created with the copy constructor.\n"; - it++; + ++it; } EXPECT_TRUE(it == generator.end()) << "At the presumed end of sequence when accessing via an iterator " @@ -161,7 +161,7 @@ void VerifyGenerator(const ParamGenerator& generator, << ", expected_values[i] is " << PrintValue(expected_values[i]) << ", *it is " << PrintValue(*it) << ", and 'it' is an iterator created with the copy constructor.\n"; - it++; + ++it; } EXPECT_TRUE(it == generator.end()) << "At the presumed end of sequence when accessing via an iterator " From 116dcce0ba357163aa907dbcb8c4c64177085f1b Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 18 Sep 2019 08:04:46 +0200 Subject: [PATCH 2/8] init member in itilializer list --- code/Importer/IFC/IFCCurve.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/Importer/IFC/IFCCurve.cpp b/code/Importer/IFC/IFCCurve.cpp index b0a1fdaa9..494381aff 100644 --- a/code/Importer/IFC/IFCCurve.cpp +++ b/code/Importer/IFC/IFCCurve.cpp @@ -311,10 +311,9 @@ class TrimmedCurve : public BoundedCurve { public: // -------------------------------------------------- TrimmedCurve(const Schema_2x3::IfcTrimmedCurve& entity, ConversionData& conv) - : BoundedCurve(entity,conv) + : BoundedCurve(entity,conv), + base(std::shared_ptr(Curve::Convert(entity.BasisCurve,conv))) { - base = std::shared_ptr(Curve::Convert(entity.BasisCurve,conv)); - typedef std::shared_ptr Entry; // for some reason, trimmed curves can either specify a parametric value From 6d4854f12c4a72cfd33fdc7dff74ad7d2c600a41 Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 18 Sep 2019 08:15:50 +0200 Subject: [PATCH 3/8] init variable in initializer list --- code/FBX/FBXExportProperty.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/FBX/FBXExportProperty.cpp b/code/FBX/FBXExportProperty.cpp index f8593e629..f2a63b72b 100644 --- a/code/FBX/FBXExportProperty.cpp +++ b/code/FBX/FBXExportProperty.cpp @@ -59,11 +59,7 @@ namespace FBX { FBXExportProperty::FBXExportProperty(bool v) : type('C') -, data(1) { - data = { - uint8_t(v) - }; -} +, data(1, uint8_t(v)) {} FBXExportProperty::FBXExportProperty(int16_t v) : type('Y') From c0ec5140ee2019d76216ccea2936bb51079daa0e Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 18 Sep 2019 08:18:52 +0200 Subject: [PATCH 4/8] init variable in initializer list --- code/Obj/ObjFileImporter.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/Obj/ObjFileImporter.cpp b/code/Obj/ObjFileImporter.cpp index 549956474..88b11e14c 100644 --- a/code/Obj/ObjFileImporter.cpp +++ b/code/Obj/ObjFileImporter.cpp @@ -79,10 +79,7 @@ using namespace std; ObjFileImporter::ObjFileImporter() : m_Buffer() , m_pRootObject( nullptr ) -, m_strAbsPath( "" ) { - DefaultIOSystem io; - m_strAbsPath = io.getOsSeparator(); -} +, m_strAbsPath( DefaultIOSystem::getOsSeparator() ) {} // ------------------------------------------------------------------------------------------------ // Destructor. From 2194577429e295c2c3d9a6d4df79bcd9fba7beba Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 18 Sep 2019 08:25:24 +0200 Subject: [PATCH 5/8] fix regression --- code/Obj/ObjFileImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Obj/ObjFileImporter.cpp b/code/Obj/ObjFileImporter.cpp index 88b11e14c..708d20cf7 100644 --- a/code/Obj/ObjFileImporter.cpp +++ b/code/Obj/ObjFileImporter.cpp @@ -79,7 +79,7 @@ using namespace std; ObjFileImporter::ObjFileImporter() : m_Buffer() , m_pRootObject( nullptr ) -, m_strAbsPath( DefaultIOSystem::getOsSeparator() ) {} +, m_strAbsPath( DefaultIOSystem().getOsSeparator() ) {} // ------------------------------------------------------------------------------------------------ // Destructor. From 1abf6d50fe96577444e90c730f2f321750747eb6 Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 18 Sep 2019 08:31:33 +0200 Subject: [PATCH 6/8] fixed regression #2 --- code/Obj/ObjFileImporter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/Obj/ObjFileImporter.cpp b/code/Obj/ObjFileImporter.cpp index 708d20cf7..549956474 100644 --- a/code/Obj/ObjFileImporter.cpp +++ b/code/Obj/ObjFileImporter.cpp @@ -79,7 +79,10 @@ using namespace std; ObjFileImporter::ObjFileImporter() : m_Buffer() , m_pRootObject( nullptr ) -, m_strAbsPath( DefaultIOSystem().getOsSeparator() ) {} +, m_strAbsPath( "" ) { + DefaultIOSystem io; + m_strAbsPath = io.getOsSeparator(); +} // ------------------------------------------------------------------------------------------------ // Destructor. From 18bbfdac1a3a6e30ea88bfac543a29673c72469e Mon Sep 17 00:00:00 2001 From: escherstair Date: Thu, 19 Sep 2019 08:01:47 +0200 Subject: [PATCH 7/8] init variable 'base' in initializer list --- code/Obj/ObjFileImporter.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/Obj/ObjFileImporter.cpp b/code/Obj/ObjFileImporter.cpp index 549956474..bd7985740 100644 --- a/code/Obj/ObjFileImporter.cpp +++ b/code/Obj/ObjFileImporter.cpp @@ -79,10 +79,7 @@ using namespace std; ObjFileImporter::ObjFileImporter() : m_Buffer() , m_pRootObject( nullptr ) -, m_strAbsPath( "" ) { - DefaultIOSystem io; - m_strAbsPath = io.getOsSeparator(); -} +, m_strAbsPath( std::string(1, DefaultIOSystem.getOsSeparator()) ) {} // ------------------------------------------------------------------------------------------------ // Destructor. From d4101bbf06f5d2aed0d57f0b63cf96000a7ea26c Mon Sep 17 00:00:00 2001 From: escherstair Date: Thu, 19 Sep 2019 08:07:55 +0200 Subject: [PATCH 8/8] fix regression --- code/Obj/ObjFileImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Obj/ObjFileImporter.cpp b/code/Obj/ObjFileImporter.cpp index bd7985740..26cc6d1f9 100644 --- a/code/Obj/ObjFileImporter.cpp +++ b/code/Obj/ObjFileImporter.cpp @@ -79,7 +79,7 @@ using namespace std; ObjFileImporter::ObjFileImporter() : m_Buffer() , m_pRootObject( nullptr ) -, m_strAbsPath( std::string(1, DefaultIOSystem.getOsSeparator()) ) {} +, m_strAbsPath( std::string(1, DefaultIOSystem().getOsSeparator()) ) {} // ------------------------------------------------------------------------------------------------ // Destructor.