From 229c8e3b8c12eb5b5c29f85e9206c43c30faab1d Mon Sep 17 00:00:00 2001 From: xingchen <1098756313@qq.com> Date: Fri, 25 Sep 2026 11:05:33 +0800 Subject: [PATCH] test: add cpp/filter.cpp source fixture --- cpp/filter.cpp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cpp/filter.cpp diff --git a/cpp/filter.cpp b/cpp/filter.cpp new file mode 100644 index 0000000..1a0dc10 --- /dev/null +++ b/cpp/filter.cpp @@ -0,0 +1,4 @@ +int smooth_sample(int current, int previous) { + if (current > previous) return (current + previous) / 2; + return current; +}