Skip to content

Commit 48bc08e

Browse files
remove array overload, use span only
1 parent 0a17d62 commit 48bc08e

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

platform/include/platform/CircularBuffer.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,6 @@ class CircularBuffer {
157157
core_util_critical_section_exit();
158158
}
159159

160-
/** Push the transaction to the buffer. This overwrites the buffer if it's full.
161-
*
162-
* @param src Data to be pushed to the buffer.
163-
*/
164-
template<CounterType N>
165-
void push(T (&src)[N])
166-
{
167-
push(src, N);
168-
}
169-
170160
/** Push the transaction to the buffer. This overwrites the buffer if it's full.
171161
*
172162
* @param src Data to be pushed to the buffer.
@@ -247,27 +237,14 @@ class CircularBuffer {
247237
return data_popped;
248238
}
249239

250-
/**
251-
* Pop multiple elements from the buffer.
252-
*
253-
* @param dest The array which will receive the elements.
254-
*
255-
* @return The number of elements popped.
256-
*/
257-
template<CounterType N>
258-
CounterType pop(T (&dest)[N])
259-
{
260-
return pop(dest, N);
261-
}
262-
263240
/**
264241
* Pop multiple elements from the buffer.
265242
*
266243
* @param dest The span that contains the buffer that will be used to store the elements.
267244
*
268245
* @return The span with the size set to number of elements popped using the buffer passed in as the parameter.
269246
*/
270-
mbed::Span<T> pop(mbed::Span<T>& dest)
247+
mbed::Span<T> pop(const mbed::Span<T>& dest)
271248
{
272249
CounterType popped = pop(dest.data(), dest.size());
273250
return mbed::make_Span(dest.data(), popped);

0 commit comments

Comments
 (0)