summaryrefslogtreecommitdiffstats
path: root/include/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-18 02:04:26 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 02:04:26 -0400
commit721659fa043a02740146ca82ed261066fcbb1077 (patch)
tree7c97d03342db7ae2226351b2f005f7fbbfecc38d /include/ingen
parent9994cdebb60ecffcf81ced46ccfd12968ea3b2da (diff)
downloadingen-721659fa043a02740146ca82ed261066fcbb1077.tar.gz
ingen-721659fa043a02740146ca82ed261066fcbb1077.tar.bz2
ingen-721659fa043a02740146ca82ed261066fcbb1077.zip
Remove redundant "inline" specifiers
Diffstat (limited to 'include/ingen')
-rw-r--r--include/ingen/Atom.hpp24
-rw-r--r--include/ingen/Clock.hpp4
-rw-r--r--include/ingen/Configuration.hpp2
-rw-r--r--include/ingen/Interface.hpp36
-rw-r--r--include/ingen/Parser.hpp4
-rw-r--r--include/ingen/Status.hpp2
-rw-r--r--include/ingen/client/PortModel.hpp10
7 files changed, 42 insertions, 40 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;