Fix empty for loop warning in RingBuffer constructor... and scary indentation......
authorDavid Robillard <d@drobilla.net>
Wed, 25 Feb 2009 17:23:15 +0000 (17:23 +0000)
committerDavid Robillard <d@drobilla.net>
Wed, 25 Feb 2009 17:23:15 +0000 (17:23 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@4652 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/pbd/pbd/ringbuffer.h
libs/pbd/pbd/ringbufferNPT.h

index a84ed73e7f951db51b84d53fbaac244873ceb72e..1d9431ca071515becf2807d1df61c99ff95f7beb 100644 (file)
@@ -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;
index 9db09098d6412a2fb91a0b724d116ebf44a5589a..30c71a8b1ab368181b58bf573b844263a5f67726 100644 (file)
@@ -34,10 +34,9 @@ class RingBufferNPT
                size = sz;
                buf = new T[size];
                reset ();
-
-       };
+       }
        
-       virtual ~RingBufferNPT() {
+       virtual ~RingBufferNPT () {
                delete [] buf;
        }