Remove unnecessary std::move() from the return of a temporary,
allowing copy elision and removing the compiler warning.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add a terminating LF to tracked text files that were missing a
newline at end of file. This avoids Codacy whitespace failures and
ensures text files conform to the repository line-ending policy.
Affected files were identified and fixed with the following script.
It checks all tracked files against .gitattributes, skips files marked
as binary or -text, and reports the final 32 bytes of any non-empty text
file that does not end with LF before adding the missing newline.
git ls-files -z |
while IFS= read -r -d '' f; do
attr=$(git check-attr text -- "$f")
case "$attr" in
"$f: text: unset"|"$f: text: unspecified")
continue
;;
esac
[ -f "$f" ] || continue
[ -s "$f" ] || continue
[ "$(tail -c 1 -- "$f" | od -An -t x1 | tr -d ' \n')" = "0a" ] || {
printf '%s\n' "$f"
tail -c 32 -- "$f" | hexdump -C
printf '\n' >> "$f"
}
done
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize prevMetrics and currMetrics so the metric buffers are not left
indeterminate during construction. Both buffers are explicitly populated
before their contents are used, so this is defensive initialization rather
than a functional fix.
Detected by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Remove the unused M17Demodulator::idev member. It is never assigned or
read; frequency deviation is provided by FreqDevEstimator::idev().
Detected by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize samples_ during construction so the sample buffer is not left
indeterminate. The existing triggered_ state ensures the buffer is
initialized with fill() before its contents are used, so this is defensive
initialization rather than a functional fix.
Detected by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>