diff options
author | David Sorber <david.sorber@blacklynx.tech> | 2021-10-13 10:15:55 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-10-25 11:27:01 -0400 |
commit | 47c374211221f3c636e0be2238ef233dd353697d (patch) | |
tree | 7988a999efa96797e4011122f104ee2988c7ef4e /gnuradio-runtime/lib/buffer.cc | |
parent | 0c08ee00da21f48d30273338b2c62aacbc912eff (diff) |
runtime: rename buffer_context to transfer type; also rename the
MAKE_CUSTOM_BUFFER_TYPE macro function to DEFINE_CUSTOM_BUFFER_TYPE;
mark unused parameters from virtual functions with the
[[maybe_unused]] C++ attribute
Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
Diffstat (limited to 'gnuradio-runtime/lib/buffer.cc')
-rw-r--r-- | gnuradio-runtime/lib/buffer.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc index 75fc447e8d..1f949f4ec9 100644 --- a/gnuradio-runtime/lib/buffer.cc +++ b/gnuradio-runtime/lib/buffer.cc @@ -80,7 +80,7 @@ buffer::buffer(buffer_mapping_type buf_type, d_downstream_lcm_nitems(downstream_lcm_nitems), d_write_multiple(0), d_max_reader_output_multiple(downstream_max_out_mult), - d_context(buffer_context::DEFAULT_INVALID) + d_transfer_type(transfer_type::DEFAULT_INVALID) { gr::configure_default_loggers(d_logger, d_debug_logger, "buffer"); @@ -256,18 +256,20 @@ std::ostream& operator<<(std::ostream& os, const buffer& buf) return os; } -void buffer::set_context(const buffer_context& context) +void buffer::set_transfer_type(const transfer_type& type) { - if ((d_context == buffer_context::DEFAULT_INVALID) || (d_context == context)) { - // Set the context if the existing value is the default or if it is the + if ((d_transfer_type == transfer_type::DEFAULT_INVALID) || + (d_transfer_type == type)) { + // Set the transfer type if the existing value is the default or if it is the // same as what's already been set - d_context = context; + d_transfer_type = type; } else { - // Otherwise error out as the context value cannot be changed after + // Otherwise error out as the transfer type value cannot be changed after // it is set std::ostringstream msg; - msg << "Block: " << link()->identifier() << " has context " << d_context - << " assigned. Cannot change to context " << context << "."; + msg << "Block: " << link()->identifier() << " has transfer type " + << d_transfer_type << " assigned. Cannot change to transfer type " << type + << "."; GR_LOG_ERROR(d_logger, msg.str()); throw std::runtime_error(msg.str()); } |