From 4284a2059aa8f556570ea71a70532c49ec7783ca Mon Sep 17 00:00:00 2001 From: samypr100 <3933065+samypr100@users.noreply.github.com> Date: Mon, 13 Feb 2023 16:58:16 -0500 Subject: [PATCH] Style fix for open3d/utility/Helper.h Using {} initializer for WritePointCloudOption on tests/t/io/PointCloudIO.cpp --- cpp/open3d/utility/Helper.h | 2 +- cpp/tests/t/io/PointCloudIO.cpp | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/cpp/open3d/utility/Helper.h b/cpp/open3d/utility/Helper.h index eea200bc56c..9a66c6af8a8 100644 --- a/cpp/open3d/utility/Helper.h +++ b/cpp/open3d/utility/Helper.h @@ -186,7 +186,7 @@ inline std::string FastFormatString(const std::string& format, Args... args) { buffer + size_s); // no + 1 since we ignore the \0 std::free(buffer); // asprintf calls malloc return ret; -#endif // _WIN32 +#endif // _WIN32 }; void Sleep(int milliseconds); diff --git a/cpp/tests/t/io/PointCloudIO.cpp b/cpp/tests/t/io/PointCloudIO.cpp index e1c6b315288..4958e3b19f0 100644 --- a/cpp/tests/t/io/PointCloudIO.cpp +++ b/cpp/tests/t/io/PointCloudIO.cpp @@ -406,8 +406,7 @@ TEST(TPointCloudIO, ReadWritePointCloudAsPCD) { EXPECT_TRUE(t::io::WritePointCloud( filename_ascii, input_pcd, - open3d::io::WritePointCloudOption( - /*ascii*/ true, /*compressed*/ false, false, {}))); + {/*ascii*/ true, /*compressed*/ false, false})); t::geometry::PointCloud ascii_pcd; t::io::ReadPointCloud(filename_ascii, ascii_pcd); @@ -422,8 +421,7 @@ TEST(TPointCloudIO, ReadWritePointCloudAsPCD) { EXPECT_TRUE(t::io::WritePointCloud( filename_binary, input_pcd, - open3d::io::WritePointCloudOption( - /*ascii*/ false, /*compressed*/ false, false, {}))); + {/*ascii*/ false, /*compressed*/ false, false})); t::geometry::PointCloud binary_pcd; t::io::ReadPointCloud(filename_binary, binary_pcd); @@ -439,8 +437,7 @@ TEST(TPointCloudIO, ReadWritePointCloudAsPCD) { EXPECT_TRUE(t::io::WritePointCloud( filename_binary_compressed, input_pcd, - open3d::io::WritePointCloudOption( - /*ascii*/ false, /*compressed*/ true, false, {}))); + {/*ascii*/ false, /*compressed*/ true, false})); t::geometry::PointCloud binary_compressed_pcd; t::io::ReadPointCloud(filename_binary_compressed, binary_compressed_pcd); @@ -464,8 +461,7 @@ TEST(TPointCloudIO, ReadWritePointCloudAsPCD) { EXPECT_TRUE(t::io::WritePointCloud( filename_ascii_f32, input_pcd, - open3d::io::WritePointCloudOption( - /*ascii*/ true, /*compressed*/ false, false, {}))); + {/*ascii*/ true, /*compressed*/ false, false})); t::geometry::PointCloud ascii_f32_pcd; t::io::ReadPointCloud(filename_ascii_f32, ascii_f32_pcd); @@ -487,8 +483,7 @@ TEST(TPointCloudIO, ReadWritePointCloudAsPCD) { EXPECT_TRUE(t::io::WritePointCloud( filename_ascii_uint32, input_pcd, - open3d::io::WritePointCloudOption( - /*ascii*/ true, /*compressed*/ false, false, {}))); + {/*ascii*/ true, /*compressed*/ false, false})); t::geometry::PointCloud ascii_uint32_pcd; t::io::ReadPointCloud(filename_ascii_uint32, ascii_uint32_pcd);