mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Little code size tweak using std::move in constructors.
This commit is contained in:
parent
cff314cbc8
commit
af8c9609a8
@ -116,19 +116,21 @@ private:
|
|||||||
template<typename ErrorFilter>
|
template<typename ErrorFilter>
|
||||||
class ClockRecovery {
|
class ClockRecovery {
|
||||||
public:
|
public:
|
||||||
|
using SymbolHandler = std::function<void(const float)>;
|
||||||
|
|
||||||
ClockRecovery(
|
ClockRecovery(
|
||||||
const float sampling_rate,
|
const float sampling_rate,
|
||||||
const float symbol_rate,
|
const float symbol_rate,
|
||||||
ErrorFilter error_filter,
|
ErrorFilter error_filter,
|
||||||
std::function<void(const float)> symbol_handler
|
SymbolHandler symbol_handler
|
||||||
) : symbol_handler { symbol_handler }
|
) : symbol_handler { std::move(symbol_handler) }
|
||||||
{
|
{
|
||||||
configure(sampling_rate, symbol_rate, error_filter);
|
configure(sampling_rate, symbol_rate, error_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClockRecovery(
|
ClockRecovery(
|
||||||
std::function<void(const float)> symbol_handler
|
SymbolHandler symbol_handler
|
||||||
) : symbol_handler { symbol_handler }
|
) : symbol_handler { std::move(symbol_handler) }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +157,7 @@ private:
|
|||||||
dsp::interpolation::LinearResampler resampler;
|
dsp::interpolation::LinearResampler resampler;
|
||||||
GardnerTimingErrorDetector timing_error_detector;
|
GardnerTimingErrorDetector timing_error_detector;
|
||||||
ErrorFilter error_filter;
|
ErrorFilter error_filter;
|
||||||
std::function<void(const float)> symbol_handler;
|
const SymbolHandler symbol_handler;
|
||||||
|
|
||||||
void resampler_callback(const float interpolated_sample) {
|
void resampler_callback(const float interpolated_sample) {
|
||||||
timing_error_detector(interpolated_sample,
|
timing_error_detector(interpolated_sample,
|
||||||
|
@ -53,8 +53,8 @@ public:
|
|||||||
const PreambleMatcher preamble_matcher,
|
const PreambleMatcher preamble_matcher,
|
||||||
const UnstuffMatcher unstuff_matcher,
|
const UnstuffMatcher unstuff_matcher,
|
||||||
const EndMatcher end_matcher,
|
const EndMatcher end_matcher,
|
||||||
const PayloadHandlerFunc payload_handler
|
PayloadHandlerFunc payload_handler
|
||||||
) : payload_handler { payload_handler },
|
) : payload_handler { std::move(payload_handler) },
|
||||||
preamble(preamble_matcher),
|
preamble(preamble_matcher),
|
||||||
unstuff(unstuff_matcher),
|
unstuff(unstuff_matcher),
|
||||||
end(end_matcher)
|
end(end_matcher)
|
||||||
|
Loading…
Reference in New Issue
Block a user