Skip to content

Commit a1b93d1

Browse files
committed
Delint.
1 parent 82a9d92 commit a1b93d1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/protocols/protocol_explore.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ using namespace std::placeholders;
3939
using object_type = network::rpc::object_t;
4040

4141
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
42+
BC_PUSH_WARNING(NO_INCOMPLETE_SWITCH)
43+
BC_PUSH_WARNING(SMART_PTR_NOT_NEEDED)
44+
BC_PUSH_WARNING(NO_VALUE_OR_CONST_REF_SHARED_PTR)
4245

4346
// Start.
4447
// ----------------------------------------------------------------------------
@@ -107,8 +110,9 @@ bool protocol_explore::handle_get_block(const code& ec, interface::block,
107110
return false;
108111

109112
const auto& query = archive();
110-
const auto link = hash.has_value() ? query.to_header(*(hash.value())) :
111-
query.to_confirmed(height.value());
113+
const auto link = hash.has_value() ?
114+
query.to_header(*(hash.value())) : (height.has_value() ?
115+
query.to_confirmed(height.value()) : database::header_link{});
112116

113117
// TODO: there's no request.
114118
const network::http::request request{};
@@ -144,8 +148,9 @@ bool protocol_explore::handle_get_header(const code& ec, interface::header,
144148
return false;
145149

146150
const auto& query = archive();
147-
const auto link = hash.has_value() ? query.to_header(*(hash.value())) :
148-
query.to_confirmed(height.value());
151+
const auto link = hash.has_value() ?
152+
query.to_header(*(hash.value())) : (height.has_value() ?
153+
query.to_confirmed(height.value()) : database::header_link{});
149154

150155
// TODO: there's no request.
151156
const network::http::request request{};
@@ -206,6 +211,9 @@ bool protocol_explore::handle_get_transaction(const code& ec,
206211
return true;
207212
}
208213

214+
BC_POP_WARNING()
215+
BC_POP_WARNING()
216+
BC_POP_WARNING()
209217
BC_POP_WARNING()
210218

211219
#undef SUBSCRIBE_EXPLORE

0 commit comments

Comments
 (0)