aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2021-12-23 09:39:39 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-02-07 14:43:46 -0600
commited18ed376bcc71938ad73872148a3146814d831f (patch)
tree86056811e0643d62032a804dc6a76ff4e10028fa /host/lib
parenta7c5d70fecb7e7e37c81b0154eb3032d4d1cf6b1 (diff)
downloaduhd-ed18ed376bcc71938ad73872148a3146814d831f.tar.gz
uhd-ed18ed376bcc71938ad73872148a3146814d831f.tar.bz2
uhd-ed18ed376bcc71938ad73872148a3146814d831f.zip
host: Throw exception when accessing properties with incorrect type
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/property_tree.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/property_tree.cpp b/host/lib/property_tree.cpp
index a21254336..79ec22b67 100644
--- a/host/lib/property_tree.cpp
+++ b/host/lib/property_tree.cpp
@@ -138,7 +138,7 @@ public:
return node->keys();
}
- std::shared_ptr<void> _pop(const fs_path& path_) override
+ std::shared_ptr<property_iface> _pop(const fs_path& path_) override
{
const fs_path path = _root / path_;
std::lock_guard<std::mutex> lock(_guts->mutex);
@@ -164,7 +164,7 @@ public:
return prop;
}
- void _create(const fs_path& path_, const std::shared_ptr<void>& prop) override
+ void _create(const fs_path& path_, const std::shared_ptr<property_iface>& prop) override
{
const fs_path path = _root / path_;
std::lock_guard<std::mutex> lock(_guts->mutex);
@@ -183,7 +183,7 @@ public:
node->prop = prop;
}
- std::shared_ptr<void>& _access(const fs_path& path_) const override
+ std::shared_ptr<property_iface>& _access(const fs_path& path_) const override
{
const fs_path path = _root / path_;
std::lock_guard<std::mutex> lock(_guts->mutex);
@@ -210,7 +210,7 @@ private:
// basic structural node element
struct node_type : uhd::dict<std::string, node_type>
{
- std::shared_ptr<void> prop;
+ std::shared_ptr<property_iface> prop;
};
// tree guts which may be referenced in a subtree