diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 02:04:26 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 02:04:26 -0400 |
commit | 721659fa043a02740146ca82ed261066fcbb1077 (patch) | |
tree | 7c97d03342db7ae2226351b2f005f7fbbfecc38d | |
parent | 9994cdebb60ecffcf81ced46ccfd12968ea3b2da (diff) | |
download | ingen-721659fa043a02740146ca82ed261066fcbb1077.tar.gz ingen-721659fa043a02740146ca82ed261066fcbb1077.tar.bz2 ingen-721659fa043a02740146ca82ed261066fcbb1077.zip |
Remove redundant "inline" specifiers
-rw-r--r-- | include/ingen/Atom.hpp | 24 | ||||
-rw-r--r-- | include/ingen/Clock.hpp | 4 | ||||
-rw-r--r-- | include/ingen/Configuration.hpp | 2 | ||||
-rw-r--r-- | include/ingen/Interface.hpp | 36 | ||||
-rw-r--r-- | include/ingen/Parser.hpp | 4 | ||||
-rw-r--r-- | include/ingen/Status.hpp | 2 | ||||
-rw-r--r-- | include/ingen/client/PortModel.hpp | 10 | ||||
-rw-r--r-- | src/gui/App.hpp | 6 | ||||
-rw-r--r-- | src/server/ArcImpl.hpp | 4 | ||||
-rw-r--r-- | src/server/Buffer.hpp | 42 | ||||
-rw-r--r-- | src/server/BufferFactory.hpp | 2 | ||||
-rw-r--r-- | src/server/ControlBindings.hpp | 8 | ||||
-rw-r--r-- | src/server/Engine.hpp | 2 | ||||
-rw-r--r-- | src/server/Event.hpp | 16 | ||||
-rw-r--r-- | src/server/JackDriver.hpp | 15 | ||||
-rw-r--r-- | src/server/LV2Block.hpp | 2 | ||||
-rw-r--r-- | src/server/PortAudioDriver.hpp | 16 | ||||
-rw-r--r-- | src/server/PortImpl.hpp | 7 | ||||
-rw-r--r-- | src/server/PortType.hpp | 24 | ||||
-rw-r--r-- | src/server/PreProcessor.hpp | 2 | ||||
-rw-r--r-- | src/server/RunContext.cpp | 12 | ||||
-rw-r--r-- | src/server/RunContext.hpp | 26 | ||||
-rw-r--r-- | src/server/ThreadManager.hpp | 8 | ||||
-rw-r--r-- | src/server/events/Disconnect.hpp | 4 |
24 files changed, 142 insertions, 136 deletions
diff --git a/include/ingen/Atom.hpp b/include/ingen/Atom.hpp index daaecd81..0c4ac8c5 100644 --- a/include/ingen/Atom.hpp +++ b/include/ingen/Atom.hpp @@ -94,21 +94,22 @@ public: return *this; } - inline bool operator==(const Atom& other) const { + bool operator==(const Atom& other) const { if (_atom.type != other._atom.type || _atom.size != other._atom.size) { return false; } + return is_reference() ? !memcmp(_body.ptr, other._body.ptr, sizeof(LV2_Atom) + _atom.size) : _body.val == other._body.val; } - inline bool operator!=(const Atom& other) const { + bool operator!=(const Atom& other) const { return !operator==(other); } - inline bool operator<(const Atom& other) const { + bool operator<(const Atom& other) const { if (_atom.type == other._atom.type) { const uint32_t min_size = std::min(_atom.size, other._atom.size); const int cmp = is_reference() @@ -116,6 +117,7 @@ public: : memcmp(&_body.val, &other._body.val, min_size); return cmp < 0 || (cmp == 0 && _atom.size < other._atom.size); } + return type() < other.type(); } @@ -123,7 +125,7 @@ public: * Always real-time safe. * @return true iff set succeeded. */ - inline bool set_rt(const Atom& other) { + bool set_rt(const Atom& other) { if (is_reference()) { return false; } @@ -133,15 +135,15 @@ public: return true; } - inline uint32_t size() const { return _atom.size; } - inline LV2_URID type() const { return _atom.type; } - inline bool is_valid() const { return _atom.type; } + uint32_t size() const { return _atom.size; } + LV2_URID type() const { return _atom.type; } + bool is_valid() const { return _atom.type; } - inline const void* get_body() const { + const void* get_body() const { return is_reference() ? static_cast<void*>(_body.ptr + 1) : &_body.val; } - inline void* get_body() { + void* get_body() { return is_reference() ? static_cast<void*>(_body.ptr + 1) : &_body.val; } @@ -160,14 +162,14 @@ public: private: /** Free dynamically allocated value, if applicable. */ - inline void dealloc() { + void dealloc() { if (is_reference()) { free(_body.ptr); } } /** Return true iff this value is dynamically allocated. */ - inline bool is_reference() const { + bool is_reference() const { return _atom.size > sizeof(_body.val); } diff --git a/include/ingen/Clock.hpp b/include/ingen/Clock.hpp index 9df26969..551202a7 100644 --- a/include/ingen/Clock.hpp +++ b/include/ingen/Clock.hpp @@ -35,7 +35,7 @@ public: Clock() { mach_timebase_info(&_timebase); } - inline uint64_t now_microseconds() const { + uint64_t now_microseconds() const { const uint64_t now = mach_absolute_time(); return now * _timebase.numer / _timebase.denom / 1e3; } @@ -45,7 +45,7 @@ private: #else - inline uint64_t now_microseconds() const { + uint64_t now_microseconds() const { struct timespec time{}; clock_gettime(_clock, &time); return static_cast<uint64_t>(time.tv_sec) * 1e6 + diff --git a/include/ingen/Configuration.hpp b/include/ingen/Configuration.hpp index 3ab5c27b..ba68950c 100644 --- a/include/ingen/Configuration.hpp +++ b/include/ingen/Configuration.hpp @@ -133,7 +133,7 @@ private: }; struct OptionNameOrder { - inline bool operator()(const Option& a, const Option& b) { + bool operator()(const Option& a, const Option& b) { return a.name < b.name; } }; diff --git a/include/ingen/Interface.hpp b/include/ingen/Interface.hpp index cb17039e..a705b830 100644 --- a/include/ingen/Interface.hpp +++ b/include/ingen/Interface.hpp @@ -65,21 +65,21 @@ public: * @{ */ - inline void operator()(const Message& msg) { message(msg); } + void operator()(const Message& msg) { message(msg); } - inline void set_response_id(int32_t id) { _seq = id; } + void set_response_id(int32_t id) { _seq = id; } - inline void bundle_begin() { message(BundleBegin{_seq++}); } - inline void bundle_end() { message(BundleEnd{_seq++}); } + void bundle_begin() { message(BundleBegin{_seq++}); } + void bundle_end() { message(BundleEnd{_seq++}); } - inline void put(const URI& uri, + void put(const URI& uri, const Properties& properties, Resource::Graph ctx = Resource::Graph::DEFAULT) { message(Put{_seq++, uri, properties, ctx}); } - inline void delta(const URI& uri, + void delta(const URI& uri, const Properties& remove, const Properties& add, Resource::Graph ctx = Resource::Graph::DEFAULT) @@ -87,34 +87,34 @@ public: message(Delta{_seq++, uri, remove, add, ctx}); } - inline void copy(const URI& old_uri, const URI& new_uri) + void copy(const URI& old_uri, const URI& new_uri) { message(Copy{_seq++, old_uri, new_uri}); } - inline void move(const raul::Path& old_path, const raul::Path& new_path) + void move(const raul::Path& old_path, const raul::Path& new_path) { message(Move{_seq++, old_path, new_path}); } - inline void del(const URI& uri) { message(Del{_seq++, uri}); } + void del(const URI& uri) { message(Del{_seq++, uri}); } - inline void connect(const raul::Path& tail, const raul::Path& head) + void connect(const raul::Path& tail, const raul::Path& head) { message(Connect{_seq++, tail, head}); } - inline void disconnect(const raul::Path& tail, const raul::Path& head) + void disconnect(const raul::Path& tail, const raul::Path& head) { message(Disconnect{_seq++, tail, head}); } - inline void disconnect_all(const raul::Path& graph, const raul::Path& path) + void disconnect_all(const raul::Path& graph, const raul::Path& path) { message(DisconnectAll{_seq++, graph, path}); } - inline void set_property(const URI& subject, + void set_property(const URI& subject, const URI& predicate, const Atom& value, Resource::Graph ctx = Resource::Graph::DEFAULT) @@ -122,18 +122,18 @@ public: message(SetProperty{_seq++, subject, predicate, value, ctx}); } - inline void undo() { message(Undo{_seq++}); } + void undo() { message(Undo{_seq++}); } - inline void redo() { message(Redo{_seq++}); } + void redo() { message(Redo{_seq++}); } - inline void get(const URI& uri) { message(Get{_seq++, uri}); } + void get(const URI& uri) { message(Get{_seq++, uri}); } - inline void response(int32_t id, Status status, const std::string& subject) + void response(int32_t id, Status status, const std::string& subject) { message(Response{id, status, subject}); } - inline void error(const std::string& error_message) + void error(const std::string& error_message) { message(Error{_seq++, error_message}); } diff --git a/include/ingen/Parser.hpp b/include/ingen/Parser.hpp index 599b8953..485a5fa8 100644 --- a/include/ingen/Parser.hpp +++ b/include/ingen/Parser.hpp @@ -53,11 +53,11 @@ public: /** Record of a resource listed in a bundle manifest. */ struct ResourceRecord { - inline ResourceRecord(URI u, FilePath f) + ResourceRecord(URI u, FilePath f) : uri(std::move(u)), filename(std::move(f)) {} - inline bool operator<(const ResourceRecord& r) const { + bool operator<(const ResourceRecord& r) const { return uri < r.uri; } diff --git a/include/ingen/Status.hpp b/include/ingen/Status.hpp index c4ffd4c9..fbd23dc0 100644 --- a/include/ingen/Status.hpp +++ b/include/ingen/Status.hpp @@ -50,7 +50,7 @@ enum class Status { COMPILATION_FAILED }; -static inline const char* +inline const char* ingen_status_string(Status st) { switch (st) { diff --git a/include/ingen/client/PortModel.hpp b/include/ingen/client/PortModel.hpp index 9323b84b..903a435d 100644 --- a/include/ingen/client/PortModel.hpp +++ b/include/ingen/client/PortModel.hpp @@ -48,10 +48,10 @@ public: bool supports(const URIs::Quark& value_type) const; - inline uint32_t index() const { return _index; } - inline const Atom& value() const { return get_property(_uris.ingen_value); } - inline bool is_input() const { return (_direction == Direction::INPUT); } - inline bool is_output() const { return (_direction == Direction::OUTPUT); } + uint32_t index() const { return _index; } + const Atom& value() const { return get_property(_uris.ingen_value); } + bool is_input() const { return (_direction == Direction::INPUT); } + bool is_output() const { return (_direction == Direction::OUTPUT); } bool port_property(const URIs::Quark& uri) const; @@ -65,7 +65,7 @@ public: } bool is_uri() const; - inline bool operator==(const PortModel& pm) const { return (path() == pm.path()); } + bool operator==(const PortModel& pm) const { return (path() == pm.path()); } void on_property(const URI& uri, const Atom& value) override; diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 032f5eb4..bb17e126 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -139,9 +139,9 @@ public: sigc::signal<void, const std::string&> signal_status_text_changed; - inline ingen::World& world() const { return _world; } - inline ingen::URIs& uris() const { return _world.uris(); } - inline ingen::Log& log() const { return _world.log(); } + ingen::World& world() const { return _world; } + ingen::URIs& uris() const { return _world.uris(); } + ingen::Log& log() const { return _world.log(); } protected: explicit App(ingen::World& world); diff --git a/src/server/ArcImpl.hpp b/src/server/ArcImpl.hpp index 09c59c8f..5e7e4357 100644 --- a/src/server/ArcImpl.hpp +++ b/src/server/ArcImpl.hpp @@ -60,8 +60,8 @@ public: ArcImpl(PortImpl* tail, PortImpl* head); ~ArcImpl() override; - inline PortImpl* tail() const { return _tail; } - inline PortImpl* head() const { return _head; } + PortImpl* tail() const { return _tail; } + PortImpl* head() const { return _head; } const raul::Path& tail_path() const override; const raul::Path& head_path() const override; diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp index d10aeb5c..8a64e621 100644 --- a/src/server/Buffer.hpp +++ b/src/server/Buffer.hpp @@ -61,10 +61,10 @@ public: void* port_data(PortType port_type, SampleCount offset); const void* port_data(PortType port_type, SampleCount offset) const; - inline LV2_URID type() const { return _type; } - inline LV2_URID value_type() const { return _value_type; } - inline uint32_t capacity() const { return _capacity; } - inline uint32_t size() const { + LV2_URID type() const { return _type; } + LV2_URID value_type() const { return _value_type; } + uint32_t capacity() const { return _capacity; } + uint32_t size() const { return is_audio() ? _capacity : sizeof(LV2_Atom) + get<LV2_Atom>()->size; } @@ -78,20 +78,20 @@ public: */ void set_type(GetFn get_func, LV2_URID type, LV2_URID value_type); - inline bool is_audio() const { + bool is_audio() const { return _type == _factory.uris().atom_Sound; } - inline bool is_control() const { + bool is_control() const { return _type == _factory.uris().atom_Float; } - inline bool is_sequence() const { + bool is_sequence() const { return _type == _factory.uris().atom_Sequence; } /// Audio or float buffers only - inline const Sample* samples() const { + const Sample* samples() const { if (is_control()) { return static_cast<const Sample*>( LV2_ATOM_BODY_CONST(get<LV2_Atom_Float>())); @@ -105,7 +105,7 @@ public: } /// Audio buffers only - inline Sample* samples() { + Sample* samples() { if (is_control()) { return static_cast<Sample*>(LV2_ATOM_BODY(get<LV2_Atom_Float>())); } @@ -118,7 +118,7 @@ public: } /// Numeric buffers only - inline Sample value_at(SampleCount offset) const { + Sample value_at(SampleCount offset) const { if (is_audio() || is_control()) { return samples()[offset]; } @@ -130,9 +130,8 @@ public: return 0.0f; } - inline void set_block(const Sample val, - const SampleCount start, - const SampleCount end) + void + set_block(const Sample val, const SampleCount start, const SampleCount end) { if (is_sequence()) { append_event(start, sizeof(val), _factory.uris().atom_Float, @@ -151,9 +150,8 @@ public: } } - inline void add_block(const Sample val, - const SampleCount start, - const SampleCount end) + void + add_block(const Sample val, const SampleCount start, const SampleCount end) { assert(is_audio() || is_control()); assert(end <= _capacity / sizeof(Sample)); @@ -164,10 +162,10 @@ public: } } - inline void write_block(const Sample val, - const SampleCount start, - const SampleCount end, - const bool add) + void write_block(const Sample val, + const SampleCount start, + const SampleCount end, + const bool add) { if (add) { add_block(val, start, end); @@ -221,9 +219,9 @@ public: template<typename T> const T* get() const { return reinterpret_cast<const T*>(_buf); } template<typename T> T* get() { return reinterpret_cast<T*>(_buf); } - inline void ref() { ++_refs; } + void ref() { ++_refs; } - inline void deref() { + void deref() { if ((--_refs) == 0) { recycle(); } diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp index df024d17..657ce7d2 100644 --- a/src/server/BufferFactory.hpp +++ b/src/server/BufferFactory.hpp @@ -85,7 +85,7 @@ private: Buffer* try_get_buffer(LV2_URID type); - inline std::atomic<Buffer*>& free_list(LV2_URID type) { + std::atomic<Buffer*>& free_list(LV2_URID type) { if (type == _uris.atom_Float) { return _free_control; } diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp index c59f9af9..b3b79c15 100644 --- a/src/server/ControlBindings.hpp +++ b/src/server/ControlBindings.hpp @@ -71,16 +71,16 @@ public: : type(t), num(n) {} - inline bool operator<(const Key& other) const { + bool operator<(const Key& other) const { return ((type < other.type) || (type == other.type && num < other.num)); } - inline bool operator==(const Key& other) const { + bool operator==(const Key& other) const { return type == other.type && num == other.num; } - inline bool operator!() const { return type == Type::NULL_CONTROL; } + bool operator!() const { return type == Type::NULL_CONTROL; } Type type; int16_t num; @@ -91,7 +91,7 @@ public: public raul::Maid::Disposable { Binding(Key k=Key(), PortImpl* p=nullptr) : key(k), port(p) {} - inline bool operator<(const Binding& rhs) const { return key < rhs.key; } + bool operator<(const Binding& rhs) const { return key < rhs.key; } Key key; PortImpl* port; diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp index 07f4c9a3..d224d5b5 100644 --- a/src/server/Engine.hpp +++ b/src/server/Engine.hpp @@ -114,7 +114,7 @@ public: * * This value is comparable to the value returned by current_time(). */ - inline uint64_t cycle_start_time(const RunContext&) const { + uint64_t cycle_start_time(const RunContext&) const { return _cycle_start_time; } diff --git a/src/server/Event.hpp b/src/server/Event.hpp index 485badb1..68b66c86 100644 --- a/src/server/Event.hpp +++ b/src/server/Event.hpp @@ -85,13 +85,13 @@ public: virtual void undo(Interface& target) {} /** Return true iff this event has been pre-processed. */ - inline bool is_prepared() const { return _status != Status::NOT_PREPARED; } + bool is_prepared() const { return _status != Status::NOT_PREPARED; } /** Return the time stamp of this event. */ - inline SampleCount time() const { return _time; } + SampleCount time() const { return _time; } /** Set the time stamp of this event. */ - inline void set_time(SampleCount time) { _time = time; } + void set_time(SampleCount time) { _time = time; } /** Get the next event to be processed after this one. */ Event* next() const { return _next.load(); } @@ -111,7 +111,7 @@ public: /** Set the undo mode of this event. */ void set_mode(Mode mode) { _mode = mode; } - inline Engine& engine() { return _engine; } + Engine& engine() { return _engine; } protected: Event(Engine& engine, @@ -137,22 +137,22 @@ protected: , _mode(Mode::NORMAL) {} - inline bool pre_process_done(Status st) { + bool pre_process_done(Status st) { _status = st; return st == Status::SUCCESS; } - inline bool pre_process_done(Status st, const URI& subject) { + bool pre_process_done(Status st, const URI& subject) { _err_subject = subject; return pre_process_done(st); } - inline bool pre_process_done(Status st, const raul::Path& subject) { + bool pre_process_done(Status st, const raul::Path& subject) { return pre_process_done(st, path_to_uri(subject)); } /** Respond to the originating client. */ - inline Status respond() { + Status respond() { if (_request_client && _request_id) { _request_client->response(_request_id, _status, _err_subject); } diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp index a00f55cc..7a1dd2e0 100644 --- a/src/server/JackDriver.hpp +++ b/src/server/JackDriver.hpp @@ -96,8 +96,8 @@ public: /** Transport state for this frame. * Intended to only be called from the audio thread. */ - inline const jack_position_t* position() { return &_position; } - inline jack_transport_state_t transport_state() { return _transport_state; } + const jack_position_t* position() { return &_position; } + jack_transport_state_t transport_state() { return _transport_state; } void append_time_events(RunContext& ctx, Buffer& buffer) override; @@ -123,16 +123,21 @@ private: static void thread_init_cb(void* jack_driver); // Static JACK callbacks which call the non-static callbacks (methods) - inline static void shutdown_cb(void* const jack_driver) { + + static void shutdown_cb(void* const jack_driver) { return static_cast<JackDriver*>(jack_driver)->_shutdown_cb(); } - inline static int process_cb(jack_nframes_t nframes, void* const jack_driver) { + + static int process_cb(jack_nframes_t nframes, void* const jack_driver) { return static_cast<JackDriver*>(jack_driver)->_process_cb(nframes); } - inline static int block_length_cb(jack_nframes_t nframes, void* const jack_driver) { + + static int block_length_cb(jack_nframes_t nframes, void* const jack_driver) { return static_cast<JackDriver*>(jack_driver)->_block_length_cb(nframes); } + // Internal methods for processing + void pre_process_port(RunContext& ctx, EnginePort* port); void post_process_port(RunContext& ctx, EnginePort* port) const; diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp index 8e87acda..9e907ffa 100644 --- a/src/server/LV2Block.hpp +++ b/src/server/LV2Block.hpp @@ -152,7 +152,7 @@ protected: struct Response : public raul::Maid::Disposable , public raul::Noncopyable , public boost::intrusive::slist_base_hook<> { - inline Response(uint32_t s, const void* d) + Response(uint32_t s, const void* d) : size(s) , data(malloc(s)) { diff --git a/src/server/PortAudioDriver.hpp b/src/server/PortAudioDriver.hpp index e57c903d..a624ee6e 100644 --- a/src/server/PortAudioDriver.hpp +++ b/src/server/PortAudioDriver.hpp @@ -91,15 +91,15 @@ public: private: friend class PortAudioPort; - inline static int - pa_process_cb(const void* inputs, - void* outputs, - unsigned long nframes, - const PaStreamCallbackTimeInfo* time, - PaStreamCallbackFlags flags, - void* handle) { + static int pa_process_cb(const void* inputs, + void* outputs, + unsigned long nframes, + const PaStreamCallbackTimeInfo* time, + PaStreamCallbackFlags flags, + void* handle) + { return static_cast<PortAudioDriver*>(handle)->process_cb( - inputs, outputs, nframes, time, flags); + inputs, outputs, nframes, time, flags); } int process_cb(const void* inputs, diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index 41c450e3..07904cff 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -145,10 +145,11 @@ public: void set_minimum(const Atom& min) { _min.set_rt(min); } void set_maximum(const Atom& max) { _max.set_rt(max); } - inline BufferRef buffer(uint32_t voice) const { + BufferRef buffer(uint32_t voice) const { return _voices->at((_poly == 1) ? 0 : voice).buffer; } - inline BufferRef prepared_buffer(uint32_t voice) const { + + BufferRef prepared_buffer(uint32_t voice) const { return _prepared_voices->at(voice).buffer; } @@ -205,7 +206,7 @@ public: uint32_t index() const { return _index; } void set_index(RunContext&, uint32_t index) { _index = index; } - inline bool is_a(PortType type) const { return _type == type; } + bool is_a(PortType type) const { return _type == type; } bool has_value() const; diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp index 2df3aa9d..65f87d02 100644 --- a/src/server/PortType.hpp +++ b/src/server/PortType.hpp @@ -59,22 +59,22 @@ public: PortType(ID id) noexcept : _id(id) {} - inline const URI& uri() const { return type_uri(_id); } - inline ID id() const { return _id; } + const URI& uri() const { return type_uri(_id); } + ID id() const { return _id; } - inline bool operator==(const ID& id) const { return (_id == id); } - inline bool operator!=(const ID& id) const { return (_id != id); } - inline bool operator==(const PortType& type) const { return (_id == type._id); } - inline bool operator!=(const PortType& type) const { return (_id != type._id); } - inline bool operator<(const PortType& type) const { return (_id < type._id); } + bool operator==(const ID& id) const { return (_id == id); } + bool operator!=(const ID& id) const { return (_id != id); } + bool operator==(const PortType& type) const { return (_id == type._id); } + bool operator!=(const PortType& type) const { return (_id != type._id); } + bool operator<(const PortType& type) const { return (_id < type._id); } - inline bool is_audio() { return _id == AUDIO; } - inline bool is_control() { return _id == CONTROL; } - inline bool is_cv() { return _id == CV; } - inline bool is_atom() { return _id == ATOM; } + bool is_audio() { return _id == AUDIO; } + bool is_control() { return _id == CONTROL; } + bool is_cv() { return _id == CV; } + bool is_atom() { return _id == ATOM; } private: - static inline const URI& type_uri(unsigned id_num) { + static const URI& type_uri(unsigned id_num) { assert(id_num <= ATOM); static const URI uris[] = { URI("http://www.w3.org/2002/07/owl#Nothing"), diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp index ff0b5fff..c17e4d87 100644 --- a/src/server/PreProcessor.hpp +++ b/src/server/PreProcessor.hpp @@ -42,7 +42,7 @@ public: ~PreProcessor(); /** Return true iff no events are enqueued. */ - inline bool empty() const { return !_head.load(); } + bool empty() const { return !_head.load(); } /** Enqueue an event. * This is safe to call from any non-realtime thread (it locks). diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp index 1e5b3657..f4e9219c 100644 --- a/src/server/RunContext.cpp +++ b/src/server/RunContext.cpp @@ -41,12 +41,12 @@ namespace ingen { namespace server { struct Notification { - explicit inline Notification(PortImpl* p = nullptr, - FrameTime f = 0, - LV2_URID k = 0, - uint32_t s = 0, - LV2_URID t = 0) - : port(p), time(f), key(k), size(s), type(t) + explicit Notification(PortImpl* p = nullptr, + FrameTime f = 0, + LV2_URID k = 0, + uint32_t s = 0, + LV2_URID t = 0) + : port(p), time(f), key(k), size(s), type(t) {} PortImpl* port; diff --git a/src/server/RunContext.hpp b/src/server/RunContext.hpp index f39b5864..30f87efd 100644 --- a/src/server/RunContext.hpp +++ b/src/server/RunContext.hpp @@ -103,17 +103,17 @@ public: * cycle (other than the fact that it must be processed in significantly * less time to avoid a dropout when running in real time). */ - inline uint64_t duration() const { + uint64_t duration() const { return static_cast<uint64_t>(_nframes) * 1e6 / _rate; } - inline void locate(FrameTime s, SampleCount nframes) { + void locate(FrameTime s, SampleCount nframes) { _start = s; _end = s + nframes; _nframes = nframes; } - inline void slice(SampleCount offset, SampleCount nframes) { + void slice(SampleCount offset, SampleCount nframes) { _offset = offset; _nframes = nframes; } @@ -129,16 +129,16 @@ public: void join(); - inline Engine& engine() const { return _engine; } - inline Task* task() const { return _task; } - inline unsigned id() const { return _id; } - inline FrameTime start() const { return _start; } - inline FrameTime time() const { return _start + _offset; } - inline FrameTime end() const { return _end; } - inline SampleCount offset() const { return _offset; } - inline SampleCount nframes() const { return _nframes; } - inline SampleCount rate() const { return _rate; } - inline bool realtime() const { return _realtime; } + Engine& engine() const { return _engine; } + Task* task() const { return _task; } + unsigned id() const { return _id; } + FrameTime start() const { return _start; } + FrameTime time() const { return _start + _offset; } + FrameTime end() const { return _end; } + SampleCount offset() const { return _offset; } + SampleCount nframes() const { return _nframes; } + SampleCount rate() const { return _rate; } + bool realtime() const { return _realtime; } protected: void run(); diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp index 7c895607..b25c6eed 100644 --- a/src/server/ThreadManager.hpp +++ b/src/server/ThreadManager.hpp @@ -34,23 +34,23 @@ enum ThreadFlag { class INGEN_SERVER_API ThreadManager { public: - static inline void set_flag(ThreadFlag f) { + static void set_flag(ThreadFlag f) { #ifndef NDEBUG flags = (static_cast<unsigned>(flags) | f); #endif } - static inline void unset_flag(ThreadFlag f) { + static void unset_flag(ThreadFlag f) { #ifndef NDEBUG flags = (static_cast<unsigned>(flags) & (~f)); #endif } - static inline void assert_thread(ThreadFlag f) { + static void assert_thread(ThreadFlag f) { assert(single_threaded || (flags & f)); } - static inline void assert_not_thread(ThreadFlag f) { + static void assert_not_thread(ThreadFlag f) { assert(single_threaded || !(flags & f)); } diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp index 5ce635e6..71ad4204 100644 --- a/src/server/events/Disconnect.hpp +++ b/src/server/events/Disconnect.hpp @@ -68,8 +68,8 @@ public: bool execute(RunContext& ctx, bool set_head_buffers); - inline PortImpl* tail() { return _tail; } - inline InputPort* head() { return _head; } + PortImpl* tail() { return _tail; } + InputPort* head() { return _head; } private: Engine& _engine; |