From 7783b7d52b780c9ed84471e38c8c4b555506f847 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Mon, 11 Mar 2024 12:45:50 -0400 Subject: [PATCH] Remove dead code (error::unknown). --- include/bitcoin/system/error/error_t.hpp | 1 - src/error/error_t.cpp | 1 - test/error/error_t.cpp | 9 --------- 3 files changed, 11 deletions(-) diff --git a/include/bitcoin/system/error/error_t.hpp b/include/bitcoin/system/error/error_t.hpp index 6c97d272dc..c63e9a9bc8 100644 --- a/include/bitcoin/system/error/error_t.hpp +++ b/include/bitcoin/system/error/error_t.hpp @@ -39,7 +39,6 @@ namespace error { enum error_t { success = 0, - unknown, not_found, not_implemented, diff --git a/src/error/error_t.cpp b/src/error/error_t.cpp index 096e4dfa22..3c7acfa4e9 100644 --- a/src/error/error_t.cpp +++ b/src/error/error_t.cpp @@ -28,7 +28,6 @@ namespace error { DEFINE_ERROR_T_MESSAGE_MAP(error) { { success, "success" }, - { unknown, "unknown error" }, { not_found, "object does not exist" }, { not_implemented, "feature not implemented" } ////{ error_last, "unmapped code" } diff --git a/test/error/error_t.cpp b/test/error/error_t.cpp index a321d63ee4..daa8a55c94 100644 --- a/test/error/error_t.cpp +++ b/test/error/error_t.cpp @@ -31,15 +31,6 @@ BOOST_AUTO_TEST_CASE(error_t__code__success__false_exected_message) BOOST_REQUIRE_EQUAL(ec.message(), "success"); } -BOOST_AUTO_TEST_CASE(error_t__code__unknown__true_exected_message) -{ - constexpr auto value = error::unknown; - const auto ec = code(value); - BOOST_REQUIRE(ec); - BOOST_REQUIRE(ec == value); - BOOST_REQUIRE_EQUAL(ec.message(), "unknown error"); -} - BOOST_AUTO_TEST_CASE(error_t__code__not_found__true_exected_message) { constexpr auto value = error::not_found;