diff options
author | David Robillard <d@drobilla.net> | 2007-07-27 00:26:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-27 00:26:40 +0000 |
commit | 972a3e8476687951e8af4e9c1d4f25014dab1b82 (patch) | |
tree | b20e1827a15a4309679fa68c7f8764e2381bde6b /src/libs/engine/Port.hpp | |
parent | f36e709b68144191d51959d6a2224cd9c3ad7871 (diff) | |
download | ingen-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.hpp')
-rw-r--r-- | src/libs/engine/Port.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
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; |