diff options
author | David Robillard <d@drobilla.net> | 2008-11-22 23:31:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-11-22 23:31:46 +0000 |
commit | 9845c8616439e9c284b9d82b9ed17296dacaaa4e (patch) | |
tree | dbdc41c05d74c8b8c031fa040a4f9c98d8e66f97 /src/engine/LV2Node.cpp | |
parent | fb87e81926cc0487b5f0e165806a7cc95053635e (diff) | |
download | ingen-9845c8616439e9c284b9d82b9ed17296dacaaa4e.tar.gz ingen-9845c8616439e9c284b9d82b9ed17296dacaaa4e.tar.bz2 ingen-9845c8616439e9c284b9d82b9ed17296dacaaa4e.zip |
Minor cleanup.
Don't initialize buffers twice on port creation (speed up node creation a bit).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1773 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/LV2Node.cpp')
-rw-r--r-- | src/engine/LV2Node.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp index 4e0f7416..96118e00 100644 --- a/src/engine/LV2Node.cpp +++ b/src/engine/LV2Node.cpp @@ -186,9 +186,8 @@ LV2Node::instantiate() for (uint32_t j=0; j < num_ports; ++j) { SLV2Port id = slv2_plugin_get_port_by_index(plug, j); - // LV2 shortnames are guaranteed to be unique, valid C identifiers + // LV2 port symbols are guaranteed to be unique, valid C identifiers port_name = slv2_value_as_string(slv2_port_get_symbol(plug, id)); - assert(port_name.find("/") == string::npos); port_path = path() + "/" + port_name; @@ -221,8 +220,8 @@ LV2Node::instantiate() } // FIXME: need nice type preserving SLV2Value -> Raul::Atom conversion - float def = isnan(def_values[j]) ? 0.0f : def_values[j]; - Atom defatm = def; + const float def = isnan(def_values[j]) ? 0.0f : def_values[j]; + const Atom defatm = def; if (direction == INPUT) port = new InputPort(this, port_name, j, _polyphony, data_type, defatm, port_buffer_size); @@ -253,7 +252,7 @@ LV2Node::instantiate() _ports->at(j) = port; } - delete [] def_values; + delete[] def_values; return true; } |