aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-04-25 13:17:42 +0000
committertobtoht <tob@featherwallet.org>2026-04-25 13:17:42 +0000
commite812304f4c97273bec66fcf279946735e3398c56 (patch)
treec5f55b5759ec426481490aecf030e06e5286d613 /src
parent8d5af0410593b93774991c10805aadfdf16e2d62 (diff)
parent919d247f7c62779a78df10e235811a24b0d0ecfd (diff)
downloadmonzero-core-e812304f4c97273bec66fcf279946735e3398c56.tar.gz
monzero-core-e812304f4c97273bec66fcf279946735e3398c56.tar.xz
monzero-core-e812304f4c97273bec66fcf279946735e3398c56.zip
Merge pull request #10461
919d247 trezor: replace use of boost::is_base_of with std::is_base_of (tobtoht)
Diffstat (limited to 'src')
-rw-r--r--src/device_trezor/device_trezor_base.hpp3
-rw-r--r--src/device_trezor/trezor/debug_link.hpp3
-rw-r--r--src/device_trezor/trezor/messages_map.hpp6
-rw-r--r--src/device_trezor/trezor/transport.hpp2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/device_trezor/device_trezor_base.hpp b/src/device_trezor/device_trezor_base.hpp
index 5b6920313..f698e7014 100644
--- a/src/device_trezor/device_trezor_base.hpp
+++ b/src/device_trezor/device_trezor_base.hpp
@@ -33,6 +33,7 @@
#include <cstddef>
#include <string>
+#include <type_traits>
#include "device/device.hpp"
#include "device/device_default.hpp"
#include "device/device_cold.hpp"
@@ -147,7 +148,7 @@ namespace trezor {
bool open_session = false)
{
// Require strictly protocol buffers response in the template.
- BOOST_STATIC_ASSERT(boost::is_base_of<google::protobuf::Message, t_message>::value);
+ static_assert(std::is_base_of<google::protobuf::Message, t_message>::value);
const bool accepting_base = boost::is_same<google::protobuf::Message, t_message>::value;
if (resp_types && !accepting_base){
throw std::invalid_argument("Cannot specify list of accepted types and not using generic response");
diff --git a/src/device_trezor/trezor/debug_link.hpp b/src/device_trezor/trezor/debug_link.hpp
index b7a252833..ba61dec9c 100644
--- a/src/device_trezor/trezor/debug_link.hpp
+++ b/src/device_trezor/trezor/debug_link.hpp
@@ -32,6 +32,7 @@
#include "transport.hpp"
#include "messages/messages-debug.pb.h"
+#include <type_traits>
namespace hw {
@@ -60,7 +61,7 @@ namespace trezor {
const boost::optional<messages::MessageType> &resp_type = boost::none,
bool no_wait = false)
{
- BOOST_STATIC_ASSERT(boost::is_base_of<google::protobuf::Message, t_message>::value);
+ static_assert(std::is_base_of<google::protobuf::Message, t_message>::value);
m_transport->write(req);
if (no_wait){
diff --git a/src/device_trezor/trezor/messages_map.hpp b/src/device_trezor/trezor/messages_map.hpp
index 30b8f875c..d2b50a3f9 100644
--- a/src/device_trezor/trezor/messages_map.hpp
+++ b/src/device_trezor/trezor/messages_map.hpp
@@ -72,14 +72,14 @@ namespace trezor {
template<class t_message=google::protobuf::Message>
static messages::MessageType get_message_wire_number() {
- BOOST_STATIC_ASSERT(boost::is_base_of<google::protobuf::Message, t_message>::value);
+ static_assert(std::is_base_of<google::protobuf::Message, t_message>::value);
return get_message_wire_number(t_message::default_instance().GetDescriptor()->name());
}
};
template<class t_message=google::protobuf::Message>
std::shared_ptr<t_message> message_ptr_retype(std::shared_ptr<google::protobuf::Message> & in){
- BOOST_STATIC_ASSERT(boost::is_base_of<google::protobuf::Message, t_message>::value);
+ static_assert(std::is_base_of<google::protobuf::Message, t_message>::value);
if (!in){
return nullptr;
}
@@ -89,7 +89,7 @@ namespace trezor {
template<class t_message=google::protobuf::Message>
std::shared_ptr<t_message> message_ptr_retype_static(std::shared_ptr<google::protobuf::Message> & in){
- BOOST_STATIC_ASSERT(boost::is_base_of<google::protobuf::Message, t_message>::value);
+ static_assert(std::is_base_of<google::protobuf::Message, t_message>::value);
if (!in){
return nullptr;
}
diff --git a/src/device_trezor/trezor/transport.hpp b/src/device_trezor/trezor/transport.hpp
index 827b189fd..7ec07afde 100644
--- a/src/device_trezor/trezor/transport.hpp
+++ b/src/device_trezor/trezor/transport.hpp
@@ -383,7 +383,7 @@ namespace trezor {
boost::optional<messages::MessageType> resp_type = boost::none)
{
// Require strictly protocol buffers response in the template.
- BOOST_STATIC_ASSERT(boost::is_base_of<google::protobuf::Message, t_message>::value);
+ static_assert(std::is_base_of<google::protobuf::Message, t_message>::value);
// Write the request
transport.write(req);