diff options
author | David Robillard <d@drobilla.net> | 2024-10-06 14:38:19 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-10-11 14:10:27 -0400 |
commit | 0a2de34d4fdcedf87e101a309aaa180fcdf18fcc (patch) | |
tree | 3932ab3a3ccea5b5dd56527afe5f046a83cc3f8c /include/lilv | |
parent | a07a8818f22bfa6b467093f1efd287e86983fdf1 (diff) | |
download | lilv-0a2de34d4fdcedf87e101a309aaa180fcdf18fcc.tar.gz lilv-0a2de34d4fdcedf87e101a309aaa180fcdf18fcc.tar.bz2 lilv-0a2de34d4fdcedf87e101a309aaa180fcdf18fcc.zip |
Add missing const qualifiers
Diffstat (limited to 'include/lilv')
-rw-r--r-- | include/lilv/lilv.h | 21 | ||||
-rw-r--r-- | include/lilv/lilvmm.hpp | 34 |
2 files changed, 28 insertions, 27 deletions
diff --git a/include/lilv/lilv.h b/include/lilv/lilv.h index 9f52925..aed4b8a 100644 --- a/include/lilv/lilv.h +++ b/include/lilv/lilv.h @@ -407,7 +407,7 @@ lilv_plugin_classes_begin(const LilvPluginClasses* collection); LILV_API const LilvPluginClass* -lilv_plugin_classes_get(const LilvPluginClasses* collection, LilvIter* i); +lilv_plugin_classes_get(const LilvPluginClasses* collection, const LilvIter* i); LILV_API LilvIter* @@ -415,7 +415,8 @@ lilv_plugin_classes_next(const LilvPluginClasses* collection, LilvIter* i); LILV_API bool -lilv_plugin_classes_is_end(const LilvPluginClasses* collection, LilvIter* i); +lilv_plugin_classes_is_end(const LilvPluginClasses* collection, + const LilvIter* i); /** Get a plugin class from `classes` by URI. @@ -446,7 +447,7 @@ lilv_scale_points_begin(const LilvScalePoints* collection); LILV_API const LilvScalePoint* -lilv_scale_points_get(const LilvScalePoints* collection, LilvIter* i); +lilv_scale_points_get(const LilvScalePoints* collection, const LilvIter* i); LILV_API LilvIter* @@ -454,7 +455,7 @@ lilv_scale_points_next(const LilvScalePoints* collection, LilvIter* i); LILV_API bool -lilv_scale_points_is_end(const LilvScalePoints* collection, LilvIter* i); +lilv_scale_points_is_end(const LilvScalePoints* collection, const LilvIter* i); /* UIs */ @@ -472,7 +473,7 @@ lilv_uis_begin(const LilvUIs* collection); LILV_API const LilvUI* -lilv_uis_get(const LilvUIs* collection, LilvIter* i); +lilv_uis_get(const LilvUIs* collection, const LilvIter* i); LILV_API LilvIter* @@ -480,7 +481,7 @@ lilv_uis_next(const LilvUIs* collection, LilvIter* i); LILV_API bool -lilv_uis_is_end(const LilvUIs* collection, LilvIter* i); +lilv_uis_is_end(const LilvUIs* collection, const LilvIter* i); /** Get a UI from `uis` by URI. @@ -510,7 +511,7 @@ lilv_nodes_begin(const LilvNodes* collection); LILV_API const LilvNode* -lilv_nodes_get(const LilvNodes* collection, LilvIter* i); +lilv_nodes_get(const LilvNodes* collection, const LilvIter* i); LILV_API LilvIter* @@ -518,7 +519,7 @@ lilv_nodes_next(const LilvNodes* collection, LilvIter* i); LILV_API bool -lilv_nodes_is_end(const LilvNodes* collection, LilvIter* i); +lilv_nodes_is_end(const LilvNodes* collection, const LilvIter* i); LILV_API LilvNode* @@ -550,7 +551,7 @@ lilv_plugins_begin(const LilvPlugins* collection); LILV_API const LilvPlugin* -lilv_plugins_get(const LilvPlugins* collection, LilvIter* i); +lilv_plugins_get(const LilvPlugins* collection, const LilvIter* i); LILV_API LilvIter* @@ -558,7 +559,7 @@ lilv_plugins_next(const LilvPlugins* collection, LilvIter* i); LILV_API bool -lilv_plugins_is_end(const LilvPlugins* collection, LilvIter* i); +lilv_plugins_is_end(const LilvPlugins* collection, const LilvIter* i); /** Get a plugin from `plugins` by URI. diff --git a/include/lilv/lilvmm.hpp b/include/lilv/lilvmm.hpp index 810187f..a798fa5 100644 --- a/include/lilv/lilvmm.hpp +++ b/include/lilv/lilvmm.hpp @@ -189,16 +189,16 @@ struct PluginClass { const LilvPluginClass* me; }; -#define LILV_WRAP_COLL(CT, ET, prefix) \ - inline CT(const Lilv##CT* c_obj) \ - : me(c_obj) \ - {} \ - LILV_WRAP_CONVERSION(const Lilv##CT) \ - LILV_WRAP0(unsigned, prefix, size) \ - LILV_WRAP1(ET, prefix, get, LilvIter*, i) \ - LILV_WRAP0(LilvIter*, prefix, begin) \ - LILV_WRAP1(LilvIter*, prefix, next, LilvIter*, i) \ - LILV_WRAP1(bool, prefix, is_end, LilvIter*, i) \ +#define LILV_WRAP_COLL(CT, ET, prefix) \ + inline CT(const Lilv##CT* c_obj) \ + : me(c_obj) \ + {} \ + LILV_WRAP_CONVERSION(const Lilv##CT) \ + LILV_WRAP0(unsigned, prefix, size) \ + LILV_WRAP1(ET, prefix, get, const LilvIter*, i) \ + LILV_WRAP0(LilvIter*, prefix, begin) \ + LILV_WRAP1(LilvIter*, prefix, next, LilvIter*, i) \ + LILV_WRAP1(bool, prefix, is_end, const LilvIter*, i) \ const Lilv##CT* me; struct PluginClasses { @@ -254,14 +254,14 @@ struct Port { #define LILV_PORT_WRAP1(RT, name, T1, a1) \ inline RT name(T1 a1) { return lilv_port_##name(parent, me, a1); } - LILV_PORT_WRAP1(LilvNodes*, get_value, LilvNode*, predicate) + LILV_PORT_WRAP1(LilvNodes*, get_value, const LilvNode*, predicate) LILV_PORT_WRAP0(LilvNodes*, get_properties) - LILV_PORT_WRAP1(bool, has_property, LilvNode*, property_uri) - LILV_PORT_WRAP1(bool, supports_event, LilvNode*, event_uri) + LILV_PORT_WRAP1(bool, has_property, const LilvNode*, property_uri) + LILV_PORT_WRAP1(bool, supports_event, const LilvNode*, event_uri) LILV_PORT_WRAP0(const LilvNode*, get_symbol) LILV_PORT_WRAP0(LilvNode*, get_name) LILV_PORT_WRAP0(const LilvNodes*, get_classes) - LILV_PORT_WRAP1(bool, is_a, LilvNode*, port_class) + LILV_PORT_WRAP1(bool, is_a, const LilvNode*, port_class) LILV_PORT_WRAP0(LilvScalePoints*, get_scale_points) // TODO: get_range (output parameters) @@ -305,7 +305,7 @@ struct Plugin { return Port(me, lilv_plugin_get_port_by_index(me, index)); } - Port get_port_by_symbol(LilvNode* symbol) const + Port get_port_by_symbol(const LilvNode* symbol) const { return Port(me, lilv_plugin_get_port_by_symbol(me, symbol)); } @@ -422,9 +422,9 @@ struct World { return lilv_world_find_nodes(me, subject, predicate, object); } - LILV_WRAP2_VOID(world, set_option, const char*, uri, LilvNode*, value) + LILV_WRAP2_VOID(world, set_option, const char*, uri, const LilvNode*, value) LILV_WRAP0_VOID(world, load_all) - LILV_WRAP1_VOID(world, load_bundle, LilvNode*, bundle_uri) + LILV_WRAP1_VOID(world, load_bundle, const LilvNode*, bundle_uri) LILV_WRAP0(const LilvPluginClass*, world, get_plugin_class) LILV_WRAP0(const LilvPluginClasses*, world, get_plugin_classes) LILV_WRAP0(Plugins, world, get_all_plugins) |