From 9bf0e9caeb8b23f9d3ea22188468c798442432ac Mon Sep 17 00:00:00 2001 From: vuule Date: Mon, 7 Aug 2023 12:42:27 -0700 Subject: [PATCH] actually return impl --- cpp/src/io/utilities/file_io_utilities.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpp/src/io/utilities/file_io_utilities.cpp b/cpp/src/io/utilities/file_io_utilities.cpp index 470bd04fcc3..28eae8b8e97 100644 --- a/cpp/src/io/utilities/file_io_utilities.cpp +++ b/cpp/src/io/utilities/file_io_utilities.cpp @@ -288,8 +288,9 @@ std::unique_ptr make_cufile_input(std::string const& filepath { if (cufile_integration::is_gds_enabled()) { try { - auto const cufile_in = std::make_unique(filepath); + auto cufile_in = std::make_unique(filepath); CUDF_LOG_INFO("File successfully opened for reading with GDS."); + return cufile_in; } catch (...) { if (cufile_integration::is_always_enabled()) { CUDF_LOG_ERROR( @@ -302,15 +303,16 @@ std::unique_ptr make_cufile_input(std::string const& filepath "buffer (possible performance impact)."); } } - return nullptr; + return {}; } std::unique_ptr make_cufile_output(std::string const& filepath) { if (cufile_integration::is_gds_enabled()) { try { - auto const cufile_out = std::make_unique(filepath); + auto cufile_out = std::make_unique(filepath); CUDF_LOG_INFO("File successfully opened for writing with GDS."); + return cufile_out; } catch (...) { if (cufile_integration::is_always_enabled()) { CUDF_LOG_ERROR( @@ -323,7 +325,7 @@ std::unique_ptr make_cufile_output(std::string const& filepa "buffer (possible performance impact)."); } } - return nullptr; + return {}; } std::vector make_file_io_slices(size_t size, size_t max_slice_size)