projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused method PBD::sys::path::branch_path
[ardour.git]
/
libs
/
pbd
/
pbd
/
ringbuffer.h
diff --git
a/libs/pbd/pbd/ringbuffer.h
b/libs/pbd/pbd/ringbuffer.h
index 3502bed21b71cfac2759957b2158f057bfe204a4..f14fa7185184356d154f40da1a134446d0200bb0 100644
(file)
--- a/
libs/pbd/pbd/ringbuffer.h
+++ b/
libs/pbd/pbd/ringbuffer.h
@@
-30,14
+30,13
@@
class RingBuffer
RingBuffer (guint sz) {
// size = ffs(sz); /* find first [bit] set is a single inlined assembly instruction. But it looks like the API rounds up so... */
guint power_of_two;
RingBuffer (guint sz) {
// size = ffs(sz); /* find first [bit] set is a single inlined assembly instruction. But it looks like the API rounds up so... */
guint power_of_two;
- for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++);
- size = 1<<power_of_two;
- size_mask = size;
- size_mask -= 1;
- buf = new T[size];
- reset ();
-
- };
+ for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++) {}
+ size = 1<<power_of_two;
+ size_mask = size;
+ size_mask -= 1;
+ buf = new T[size];
+ reset ();
+ }
virtual ~RingBuffer() {
delete [] buf;
virtual ~RingBuffer() {
delete [] buf;
@@
-56,7
+55,7
@@
class RingBuffer
}
guint read (T *dest, guint cnt);
}
guint read (T *dest, guint cnt);
- guint
write (T *src,
guint cnt);
+ guint
write (T const * src,
guint cnt);
struct rw_vector {
T *buf[2];
struct rw_vector {
T *buf[2];
@@
-159,7
+158,7
@@
RingBuffer<T>::read (T *dest, guint cnt)
}
template<class T> guint
}
template<class T> guint
-RingBuffer<T>::write (T *src, guint cnt)
+RingBuffer<T>::write (T
const
*src, guint cnt)
{
guint free_cnt;
{
guint free_cnt;