diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-19 13:52:51 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-02-28 14:47:47 -0600 |
commit | d835d348b3d2ba5e790855dde2d7824234e3c531 (patch) | |
tree | e97af5f88bd1bf0444f2681b7bbaab5b6b45be18 /host/lib/convert/convert_impl.cpp | |
parent | 0871ac23092d815ee7db86d3a82d234a28ed8111 (diff) | |
download | uhd-d835d348b3d2ba5e790855dde2d7824234e3c531.tar.gz uhd-d835d348b3d2ba5e790855dde2d7824234e3c531.tar.bz2 uhd-d835d348b3d2ba5e790855dde2d7824234e3c531.zip |
convert: Minor cleanup
This commit implements some minor cleanup of various converter- and
convert test-related code:
* Improves the log messages regarding which converter was returned for a
request.
* Modifies the result checking code in the converter tests to only
report an out-of-range sample error once, rather than reporting every
out-of-range sample encountered during the test. This vastly cuts down
on the output when a conversion has failed.
* Adds a function `reverse_converter()` which, given a
`convert::id_type` describing a conversion from C1 to C2, returns a
`convert::id_type` describing the reverse conversion (C2 to C1).
* Removes two redundant test cases from the converter test.
Diffstat (limited to 'host/lib/convert/convert_impl.cpp')
-rw-r--r-- | host/lib/convert/convert_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/convert/convert_impl.cpp b/host/lib/convert/convert_impl.cpp index 228f15552..491b8ba1d 100644 --- a/host/lib/convert/convert_impl.cpp +++ b/host/lib/convert/convert_impl.cpp @@ -83,7 +83,7 @@ convert::function_type convert::get_converter(const id_type& id, const priority_ //----------------------------------------------------------------// UHD_LOGGER_DEBUG("CONVERT") << "get_converter: For converter ID: " << id.to_pp_string() - << " Using prio: " << prio; + << " Found exact match for prio: " << prio; ; //----------------------------------------------------------------// return get_table()[id][prio]; @@ -99,7 +99,7 @@ convert::function_type convert::get_converter(const id_type& id, const priority_ //----------------------------------------------------------------// UHD_LOGGER_DEBUG("CONVERT") << "get_converter: For converter ID: " << id.to_pp_string() - << " Using prio: " << best_prio; + << " Using best available prio: " << best_prio; //----------------------------------------------------------------// // otherwise, return best prio |