mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-17 08:27:42 +02:00
add move add
This commit is contained in:
parent
08906403d1
commit
eefeb2b40b
1 changed files with 7 additions and 0 deletions
|
@ -43,6 +43,13 @@ public:
|
||||||
buffer.pop_front();
|
buffer.pop_front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void add(T&& element)
|
||||||
|
{
|
||||||
|
buffer.push_back(std::move(element));
|
||||||
|
if (buffer.size() > bufferSize)
|
||||||
|
buffer.pop_front();
|
||||||
|
}
|
||||||
|
|
||||||
/// Median as mean over N values around the median
|
/// Median as mean over N values around the median
|
||||||
T median(unsigned int mean = 1) const
|
T median(unsigned int mean = 1) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue