From 972a3e8476687951e8af4e9c1d4f25014dab1b82 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Jul 2007 00:26:40 +0000 Subject: 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 --- src/libs/engine/Port.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libs/engine/Port.cpp') 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(); } -- cgit v1.2.1