patch-libs_pbd_pbd_ringbuffer_h 829 B

12345678910111213141516171819202122232425262728
  1. $OpenBSD: patch-libs_pbd_pbd_ringbuffer_h,v 1.1 2017/05/25 09:02:05 espie Exp $
  2. indentation really looks like hell. put loop body on a different line
  3. to silence warnings
  4. Index: libs/pbd/pbd/ringbuffer.h
  5. --- libs/pbd/pbd/ringbuffer.h.orig
  6. +++ libs/pbd/pbd/ringbuffer.h
  7. @@ -30,12 +30,13 @@ class RingBuffer
  8. RingBuffer (guint sz) {
  9. // size = ffs(sz); /* find first [bit] set is a single inlined assembly instruction. But it looks like the API rounds up so... */
  10. guint power_of_two;
  11. - for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++);
  12. - size = 1<<power_of_two;
  13. - size_mask = size;
  14. - size_mask -= 1;
  15. - buf = new T[size];
  16. - reset ();
  17. + for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++)
  18. + ;
  19. + size = 1<<power_of_two;
  20. + size_mask = size;
  21. + size_mask -= 1;
  22. + buf = new T[size];
  23. + reset ();
  24. };