summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-25 17:23:15 +0000
committerDavid Robillard <d@drobilla.net>2009-02-25 17:23:15 +0000
commit77a71ac3e01410179072888358694c9caa703584 (patch)
treebb379f4782079f25d12a7cfa4f257b060421afa0 /libs
parent09f87d4f9f984369fbdd18651076d438a7444548 (diff)
Fix empty for loop warning in RingBuffer constructor... and scary indentation... this is what was intended here, yes?
git-svn-id: svn://localhost/ardour2/branches/3.0@4652 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/pbd/pbd/ringbuffer.h15
-rw-r--r--libs/pbd/pbd/ringbufferNPT.h5
2 files changed, 9 insertions, 11 deletions
diff --git a/libs/pbd/pbd/ringbuffer.h b/libs/pbd/pbd/ringbuffer.h
index a84ed73e7f..1d9431ca07 100644
--- 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;
- 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;
diff --git a/libs/pbd/pbd/ringbufferNPT.h b/libs/pbd/pbd/ringbufferNPT.h
index 9db09098d6..30c71a8b1a 100644
--- a/libs/pbd/pbd/ringbufferNPT.h
+++ b/libs/pbd/pbd/ringbufferNPT.h
@@ -34,10 +34,9 @@ class RingBufferNPT
size = sz;
buf = new T[size];
reset ();
-
- };
+ }
- virtual ~RingBufferNPT() {
+ virtual ~RingBufferNPT () {
delete [] buf;
}