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.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libs/engine/Port.hpp') diff --git a/src/libs/engine/Port.hpp b/src/libs/engine/Port.hpp index 2414e86d..2899915f 100644 --- a/src/libs/engine/Port.hpp +++ b/src/libs/engine/Port.hpp @@ -47,7 +47,7 @@ public: /** A port's parent is always a node, so static cast should be safe */ Node* parent_node() const { return (Node*)_parent; } - Buffer* buffer(size_t voice) const { return _buffers.at(voice); } + Buffer* buffer(uint32_t voice) const { return _buffers.at(voice); } /** Called once per process cycle */ virtual void pre_process(SampleCount nframes, FrameTime start, FrameTime end) = 0; @@ -60,8 +60,8 @@ public: virtual bool is_input() const = 0; virtual bool is_output() const = 0; - size_t num() const { return _index; } - size_t poly() const { return _poly; } + uint32_t num() const { return _index; } + uint32_t poly() const { return _poly; } DataType type() const { return _type; } size_t buffer_size() const { return _buffer_size; } @@ -71,13 +71,13 @@ public: bool fixed_buffers() { return _fixed_buffers; } protected: - Port(Node* const node, const std::string& name, size_t index, size_t poly, DataType type, size_t buffer_size); + Port(Node* const node, const std::string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size); virtual void allocate_buffers(); virtual void connect_buffers(); - size_t _index; - size_t _poly; + uint32_t _index; + uint32_t _poly; DataType _type; size_t _buffer_size; bool _fixed_buffers; -- cgit v1.2.1