summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Port.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-27 00:26:40 +0000
committerDavid Robillard <d@drobilla.net>2007-07-27 00:26:40 +0000
commit972a3e8476687951e8af4e9c1d4f25014dab1b82 (patch)
treeb20e1827a15a4309679fa68c7f8764e2381bde6b /src/libs/engine/Port.cpp
parentf36e709b68144191d51959d6a2224cd9c3ad7871 (diff)
downloadingen-972a3e8476687951e8af4e9c1d4f25014dab1b82.tar.gz
ingen-972a3e8476687951e8af4e9c1d4f25014dab1b82.tar.bz2
ingen-972a3e8476687951e8af4e9c1d4f25014dab1b82.zip
Use uint32_t for num_ports (and poly), matches LV2 and size_t is excessive on 64-bit.
Remove (linear) sorted assertion from Table, except in unit tests. git-svn-id: http://svn.drobilla.net/lad/ingen@643 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Port.cpp')
-rw-r--r--src/libs/engine/Port.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/engine/Port.cpp b/src/libs/engine/Port.cpp
index 873e4c85..c104c32a 100644
--- a/src/libs/engine/Port.cpp
+++ b/src/libs/engine/Port.cpp
@@ -28,7 +28,7 @@ namespace Ingen {
const char* const DataType::type_uris[4] = { "UNKNOWN", "FLOAT", "MIDI", "OSC" };
-Port::Port(Node* const node, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size)
+Port::Port(Node* const node, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size)
: GraphObject(node, name)
, _index(index)
, _poly(poly)
@@ -48,7 +48,7 @@ Port::Port(Node* const node, const string& name, size_t index, size_t poly, Data
Port::~Port()
{
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
delete _buffers.at(i);
}
@@ -58,7 +58,7 @@ Port::allocate_buffers()
{
_buffers.alloc(_poly);
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
_buffers.at(i) = BufferFactory::create(_type, _buffer_size);
}
@@ -68,7 +68,7 @@ Port::set_buffer_size(size_t size)
{
_buffer_size = size;
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
_buffers.at(i)->resize(size);
connect_buffers();
@@ -78,7 +78,7 @@ Port::set_buffer_size(size_t size)
void
Port::connect_buffers()
{
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
Port::parent_node()->set_port_buffer(i, _index, _buffers.at(i));
}
@@ -86,7 +86,7 @@ Port::connect_buffers()
void
Port::clear_buffers()
{
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
_buffers.at(i)->clear();
}