summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugin.c6
-rw-r--r--src/pluginclass.c2
-rw-r--r--src/port.c2
-rw-r--r--src/world.c18
4 files changed, 10 insertions, 18 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 544a5eb..3244692 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -237,7 +237,7 @@ void
slv2_plugin_load(SLV2Plugin p)
{
// Parse all the plugin's data files into RDF model
- for (unsigned i=0; i < slv2_values_size(p->data_uris); ++i) {
+ for (unsigned i = 0; i < slv2_values_size(p->data_uris); ++i) {
SLV2Value data_uri_val = slv2_values_get_at(p->data_uris, i);
sord_read_file(p->world->model,
sord_node_get_string(data_uri_val->val.uri_val),
@@ -544,7 +544,7 @@ slv2_plugin_get_num_ports_of_class(SLV2Plugin p,
uint32_t ret = 0;
va_list args;
- for (unsigned i=0; i < p->num_ports; ++i) {
+ for (unsigned i = 0; i < p->num_ports; ++i) {
SLV2Port port = p->ports[i];
if (!port || !slv2_port_is_a(p, port, class_1))
continue;
@@ -691,7 +691,7 @@ slv2_plugin_get_port_by_symbol(SLV2Plugin p,
SLV2Value symbol)
{
slv2_plugin_load_ports_if_necessary(p);
- for (uint32_t i=0; i < p->num_ports; ++i) {
+ for (uint32_t i = 0; i < p->num_ports; ++i) {
SLV2Port port = p->ports[i];
if (slv2_value_equals(port->symbol, symbol))
return port;
diff --git a/src/pluginclass.c b/src/pluginclass.c
index 7c2c032..b98413f 100644
--- a/src/pluginclass.c
+++ b/src/pluginclass.c
@@ -84,7 +84,7 @@ slv2_plugin_class_get_children(SLV2PluginClass plugin_class)
// Returned list doesn't own categories
SLV2PluginClasses result = raptor_new_sequence(NULL, NULL);
- for (int i=0; i < raptor_sequence_size(plugin_class->world->plugin_classes); ++i) {
+ for (int i = 0; i < raptor_sequence_size(plugin_class->world->plugin_classes); ++i) {
SLV2PluginClass c = raptor_sequence_get_at(plugin_class->world->plugin_classes, i);
SLV2Value parent = slv2_plugin_class_get_parent_uri(c);
if (parent && slv2_value_equals(slv2_plugin_class_get_uri(plugin_class), parent))
diff --git a/src/port.c b/src/port.c
index 1fa05fd..e60f176 100644
--- a/src/port.c
+++ b/src/port.c
@@ -53,7 +53,7 @@ slv2_port_is_a(SLV2Plugin plugin,
SLV2Port port,
SLV2Value port_class)
{
- for (unsigned i=0; i < slv2_values_size(port->classes); ++i)
+ for (unsigned i = 0; i < slv2_values_size(port->classes); ++i)
if (slv2_value_equals(slv2_values_get_at(port->classes, i), port_class))
return true;
diff --git a/src/world.c b/src/world.c
index af9fe78..d340191 100644
--- a/src/world.c
+++ b/src/world.c
@@ -41,11 +41,10 @@ slv2_world_set_prefix(SLV2World world, const char* name, const char* uri)
serd_env_add(world->namespaces, &name_node, &uri_node);
}
-/* private */
-static SLV2World
-slv2_world_new_internal(SLV2World world)
+SLV2World
+slv2_world_new()
{
- assert(world);
+ SLV2World world = (SLV2World)malloc(sizeof(struct _SLV2World));
world->model = sord_new();
if (!world->model)
@@ -106,13 +105,6 @@ fail:
return NULL;
}
-SLV2World
-slv2_world_new()
-{
- SLV2World world = (SLV2World)malloc(sizeof(struct _SLV2World));
- return slv2_world_new_internal(world);
-}
-
void
slv2_world_free(SLV2World world)
{
@@ -142,7 +134,7 @@ slv2_world_free(SLV2World world)
slv2_node_free(world->xsd_integer_node);
slv2_node_free(world->xsd_decimal_node);
- for (int i=0; i < raptor_sequence_size(world->plugins); ++i)
+ for (int i = 0; i < raptor_sequence_size(world->plugins); ++i)
slv2_plugin_free(raptor_sequence_get_at(world->plugins, i));
raptor_free_sequence(world->plugins);
world->plugins = NULL;
@@ -669,7 +661,7 @@ slv2_world_get_plugins_by_filter(SLV2World world, bool (*include)(SLV2Plugin))
{
SLV2Plugins result = slv2_plugins_new();
- for (int i=0; i < raptor_sequence_size(world->plugins); ++i) {
+ for (int i = 0; i < raptor_sequence_size(world->plugins); ++i) {
SLV2Plugin p = raptor_sequence_get_at(world->plugins, i);
if (include(p))
raptor_sequence_push(result, p);