summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Clock.hpp12
-rw-r--r--ingen/Forge.hpp4
-rw-r--r--ingen/Log.hpp2
-rw-r--r--ingen/URIMap.hpp2
-rw-r--r--ingen/client/PluginModel.hpp2
5 files changed, 12 insertions, 10 deletions
diff --git a/ingen/Clock.hpp b/ingen/Clock.hpp
index c3b0f64d..5345d7a6 100644
--- a/ingen/Clock.hpp
+++ b/ingen/Clock.hpp
@@ -47,15 +47,17 @@ private:
inline uint64_t now_microseconds() const {
struct timespec time;
-# if defined(CLOCK_MONOTONIC_RAW)
- clock_gettime(CLOCK_MONOTONIC_RAW, &time);
-# else
- clock_gettime(CLOCK_MONOTONIC, &time);
-# endif
+ clock_gettime(_clock, &time);
return static_cast<uint64_t>(time.tv_sec) * 1e6 +
static_cast<uint64_t>(time.tv_nsec) / 1e3;
}
+private:
+# if defined(CLOCK_MONOTONIC_RAW)
+ const clockid_t _clock = CLOCK_MONOTONIC_RAW;
+# else
+ const clockid_t _clock = CLOCK_MONOTONIC;
+# endif
#endif
};
diff --git a/ingen/Forge.hpp b/ingen/Forge.hpp
index b414a6ab..10b4e622 100644
--- a/ingen/Forge.hpp
+++ b/ingen/Forge.hpp
@@ -43,7 +43,7 @@ public:
return atom.type() == URI || atom.type() == URID;
}
- Atom make() { return Atom(); }
+ static Atom make() { return Atom(); }
Atom make(int32_t v) { return Atom(sizeof(v), Int, &v); }
Atom make(float v) { return Atom(sizeof(v), Float, &v); }
Atom make(bool v) {
@@ -55,7 +55,7 @@ public:
Atom make_urid(const ingen::URI& u);
- Atom alloc(uint32_t size, uint32_t type, const void* val) {
+ static Atom alloc(uint32_t size, uint32_t type, const void* val) {
return Atom(size, type, val);
}
diff --git a/ingen/Log.hpp b/ingen/Log.hpp
index 0a04c8f0..e6bc2b39 100644
--- a/ingen/Log.hpp
+++ b/ingen/Log.hpp
@@ -93,7 +93,7 @@ public:
void set_sink(Sink s) { _sink = s; }
private:
- void print(FILE* stream, const std::string& msg);
+ void print(FILE* stream, const std::string& msg) const;
LV2_Log_Log* _log;
URIs& _uris;
diff --git a/ingen/URIMap.hpp b/ingen/URIMap.hpp
index a3b9f219..db10241f 100644
--- a/ingen/URIMap.hpp
+++ b/ingen/URIMap.hpp
@@ -74,7 +74,7 @@ public:
struct URIDUnmapFeature : public Feature {
URIDUnmapFeature(URIMap* map, LV2_URID_Unmap* impl);
- const char* unmap(const LV2_URID urid);
+ const char* unmap(const LV2_URID urid) const;
static const char* default_unmap(LV2_URID_Map_Handle h, LV2_URID urid);
LV2_URID_Unmap urid_unmap;
};
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 142f28bf..dc0c724f 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -109,7 +109,7 @@ protected:
void add_preset(const URI& uri, const std::string& label);
private:
- std::string get_documentation(const LilvNode* subject, bool html) const;
+ static std::string get_documentation(const LilvNode* subject, bool html);
static Sord::World* _rdf_world;
static LilvWorld* _lilv_world;