From 4ec348617d03d9c4e8a74d011d46eeae6c8cfb8c Mon Sep 17 00:00:00 2001 From: Trevor Shoe Date: Tue, 17 Dec 2024 09:02:30 -0500 Subject: [PATCH] Replace `auto _` with `std::ignore` --- tests/test_image_vault_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_image_vault_utils.cpp b/tests/test_image_vault_utils.cpp index b99ec3e58f..9e971bf04d 100644 --- a/tests/test_image_vault_utils.cpp +++ b/tests/test_image_vault_utils.cpp @@ -83,7 +83,7 @@ TEST_F(TestImageVaultUtils, copy_to_dir_copys_to_dir) TEST_F(TestImageVaultUtils, compute_hash_throws_when_cant_read) { QBuffer buffer{}; // note: buffer is not opened - MP_EXPECT_THROW_THAT(auto _ = MP_IMAGE_VAULT_UTILS.compute_hash(buffer), + MP_EXPECT_THROW_THAT(std::ignore = MP_IMAGE_VAULT_UTILS.compute_hash(buffer), std::runtime_error, mpt::match_what(HasSubstr("Failed to read"))); } @@ -106,7 +106,7 @@ TEST_F(TestImageVaultUtils, compute_file_hash_throws_when_cant_open) }))) .WillOnce(Return(false)); - MP_EXPECT_THROW_THAT(auto _ = MP_IMAGE_VAULT_UTILS.compute_file_hash(test_path), + MP_EXPECT_THROW_THAT(std::ignore = MP_IMAGE_VAULT_UTILS.compute_file_hash(test_path), std::runtime_error, mpt::match_what(AllOf(HasSubstr(test_path.toStdString()), HasSubstr("Failed to open")))); }