mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-29 18:27:12 +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();
|
||||
}
|
||||
|
||||
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
|
||||
T median(unsigned int mean = 1) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue