aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils/gain_group.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-01-08 09:33:36 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-04 08:07:26 -0600
commit107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch)
treefdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/utils/gain_group.cpp
parent7d5e48032baa62cbe7467833b9e057900602f4b9 (diff)
downloaduhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
Diffstat (limited to 'host/lib/utils/gain_group.cpp')
-rw-r--r--host/lib/utils/gain_group.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp
index 5544afb0c..e66692570 100644
--- a/host/lib/utils/gain_group.cpp
+++ b/host/lib/utils/gain_group.cpp
@@ -63,7 +63,7 @@ public:
/*NOP*/
}
- gain_range_t get_range(const std::string& name)
+ gain_range_t get_range(const std::string& name) override
{
if (not name.empty())
return _name_to_fcns.get(name).get_range();
@@ -83,7 +83,7 @@ public:
return gain_range_t(overall_min, overall_max, overall_step);
}
- double get_value(const std::string& name)
+ double get_value(const std::string& name) override
{
if (not name.empty())
return _name_to_fcns.get(name).get_value();
@@ -95,13 +95,13 @@ public:
return overall_gain;
}
- void set_value(double gain, const std::string& name)
+ void set_value(double gain, const std::string& name) override
{
if (not name.empty())
return _name_to_fcns.get(name).set_value(gain);
std::vector<gain_fcns_t> all_fcns = get_all_fcns();
- if (all_fcns.size() == 0)
+ if (all_fcns.empty())
return; // nothing to set!
// get the max step size among the gains
@@ -157,13 +157,13 @@ public:
}
}
- const std::vector<std::string> get_names(void)
+ const std::vector<std::string> get_names(void) override
{
return _name_to_fcns.keys();
}
void register_fcns(
- const std::string& name, const gain_fcns_t& gain_fcns, size_t priority)
+ const std::string& name, const gain_fcns_t& gain_fcns, size_t priority) override
{
if (name.empty() or _name_to_fcns.has_key(name)) {
// ensure the name name is unique and non-empty