From 25d8d6f611851d587e98607cba79a5bb74db2cb1 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Tue, 21 Dec 2021 13:13:53 -0600 Subject: host: Add char* overload for device_addr_t This allows constructing a multi_usrp using a string constant: ``` auto usrp = uhd::usrp::multi_usrp::make("type=x4xx"); ``` --- host/lib/types/device_addr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host/lib/types') diff --git a/host/lib/types/device_addr.cpp b/host/lib/types/device_addr.cpp index 01dd46f5c..8f0fffa75 100644 --- a/host/lib/types/device_addr.cpp +++ b/host/lib/types/device_addr.cpp @@ -44,6 +44,12 @@ device_addr_t::device_addr_t(const std::string& args) } } +device_addr_t::device_addr_t(const char* args) : + device_addr_t(std::string(args)) +{ + // No additional construction is necessary +} + device_addr_t::device_addr_t(const std::map& info) { for (auto& t : info) { -- cgit v1.2.3