summaryrefslogtreecommitdiff
path: root/libs/evoral
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-24 02:54:10 +0000
committerDavid Robillard <d@drobilla.net>2012-05-24 02:54:10 +0000
commit27a1cf2cf73703267cac5bda2acca386afb374b3 (patch)
tree122ceba55fef1d183d1b32dca1fd60ffdc113112 /libs/evoral
parenteffe4de1889bfefba6550dff4244e06c2c7261bd (diff)
Compile cleanly with clang.
To compile Ardour with LLVM/clang, do the usual thing but set the CXX and CC environment variables, e.g.: CC=/usr/bin/clang CXX=/usr/bin/clang++ ./waf configure build git-svn-id: svn://localhost/ardour2/branches/3.0@12418 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral')
-rw-r--r--libs/evoral/evoral/ControlList.hpp3
-rw-r--r--libs/evoral/evoral/Event.hpp3
-rw-r--r--libs/evoral/evoral/EventRingBuffer.hpp8
-rw-r--r--libs/evoral/evoral/MIDIEvent.hpp3
-rw-r--r--libs/evoral/src/libsmf/smf_save.c1
5 files changed, 10 insertions, 8 deletions
diff --git a/libs/evoral/evoral/ControlList.hpp b/libs/evoral/evoral/ControlList.hpp
index c54c231ca7..f7eba87ba6 100644
--- a/libs/evoral/evoral/ControlList.hpp
+++ b/libs/evoral/evoral/ControlList.hpp
@@ -35,7 +35,8 @@ class Curve;
/** A single event (time-stamped value) for a control
*/
-struct ControlEvent {
+class ControlEvent {
+public:
ControlEvent (double w, double v)
: when (w), value (v), coeff (0)
{}
diff --git a/libs/evoral/evoral/Event.hpp b/libs/evoral/evoral/Event.hpp
index 5c287fd714..747b795480 100644
--- a/libs/evoral/evoral/Event.hpp
+++ b/libs/evoral/evoral/Event.hpp
@@ -44,7 +44,8 @@ void init_event_id_counter(event_id_t n);
* Template parameter Time is the type of the time stamp used for this event.
*/
template<typename Time>
-struct Event {
+class Event {
+public:
#ifdef EVORAL_EVENT_ALLOC
Event (EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false);
diff --git a/libs/evoral/evoral/EventRingBuffer.hpp b/libs/evoral/evoral/EventRingBuffer.hpp
index 11d487f778..8fec622243 100644
--- a/libs/evoral/evoral/EventRingBuffer.hpp
+++ b/libs/evoral/evoral/EventRingBuffer.hpp
@@ -47,7 +47,7 @@ public:
EventRingBuffer(size_t capacity) : PBD::RingBufferNPT<uint8_t>(capacity)
{}
- size_t capacity() const { return bufsize(); }
+ inline size_t capacity() const { return bufsize(); }
/** Peek at the ringbuffer (read w/o advancing read pointer).
* @return how much has been peeked (wraps around if read exceeds
@@ -57,10 +57,10 @@ public:
* read-pointer---^
* </pre>
*/
- bool peek (uint8_t*, size_t size);
+ inline bool peek (uint8_t*, size_t size);
- uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf);
- bool read (Time* time, EventType* type, uint32_t* size, uint8_t* buf);
+ inline uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf);
+ inline bool read (Time* time, EventType* type, uint32_t* size, uint8_t* buf);
};
template<typename Time>
diff --git a/libs/evoral/evoral/MIDIEvent.hpp b/libs/evoral/evoral/MIDIEvent.hpp
index c695e7d7a9..e38f4f55db 100644
--- a/libs/evoral/evoral/MIDIEvent.hpp
+++ b/libs/evoral/evoral/MIDIEvent.hpp
@@ -36,7 +36,8 @@ namespace Evoral {
* valid MIDI data for these functions to make sense.
*/
template<typename Time>
-struct MIDIEvent : public Event<Time> {
+class MIDIEvent : public Event<Time> {
+public:
MIDIEvent(EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false)
: Event<Time>(type, time, size, buf, alloc)
{}
diff --git a/libs/evoral/src/libsmf/smf_save.c b/libs/evoral/src/libsmf/smf_save.c
index 0540232707..b99af75461 100644
--- a/libs/evoral/src/libsmf/smf_save.c
+++ b/libs/evoral/src/libsmf/smf_save.c
@@ -180,7 +180,6 @@ smf_format_vlq(unsigned char *buf, int length, unsigned long value)
}
assert(i <= length);
- length = length; // get rid of stupid gcc warnings about unused params if assert() is null
/* + 1, because "i" is an offset, not a count. */
return (i + 1);