diff options
author | David Robillard <d@drobilla.net> | 2020-08-01 11:50:31 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-01 16:48:06 +0200 |
commit | 358c0a4140406c8c38138a88aa03a4fc0ec6e7ee (patch) | |
tree | 21a0c0397ca9bd8e67136c472d8146bb3a22a204 /src/server/events | |
parent | b453818f17a84c01d679088e5a377e244a231981 (diff) | |
download | ingen-358c0a4140406c8c38138a88aa03a4fc0ec6e7ee.tar.gz ingen-358c0a4140406c8c38138a88aa03a4fc0ec6e7ee.tar.bz2 ingen-358c0a4140406c8c38138a88aa03a4fc0ec6e7ee.zip |
Use modern casts
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/CreatePort.cpp | 4 | ||||
-rw-r--r-- | src/server/events/Delete.cpp | 6 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 2 | ||||
-rw-r--r-- | src/server/events/SetPortValue.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index d0dcbaf3..e6862731 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -172,8 +172,8 @@ CreatePort::pre_process(PreProcessContext&) _update = _graph_port->properties(); - assert(_graph_port->index() == (uint32_t)index_i->second.get<int32_t>()); - assert(_graph->num_ports_non_rt() == (uint32_t)old_n_ports + 1); + assert(_graph_port->index() == static_cast<uint32_t>(index_i->second.get<int32_t>())); + assert(_graph->num_ports_non_rt() == static_cast<uint32_t>(old_n_ports) + 1u); assert(_ports_array->size() == _graph->num_ports_non_rt()); assert(_graph_port->index() < _ports_array->size()); return Event::pre_process_done(Status::SUCCESS); diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index 5d605bca..f5f2e272 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -121,9 +121,9 @@ Delete::pre_process(PreProcessContext& ctx) _port_index_changes.emplace( port->path(), std::make_pair(port->index(), i)); port->remove_property(uris.lv2_index, uris.patch_wildcard); - port->set_property( - uris.lv2_index, - _engine.buffer_factory()->forge().make((int32_t)i)); + port->set_property(uris.lv2_index, + _engine.buffer_factory()->forge().make( + static_cast<int32_t>(i))); } } } diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 0a7b05ea..eb70d046 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -148,7 +148,7 @@ s_add_set_event(const char* port_symbol, uint32_t size, uint32_t type) { - ((Delta*)user_data)->add_set_event(port_symbol, value, size, type); + static_cast<Delta*>(user_data)->add_set_event(port_symbol, value, size, type); } static LilvNode* diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index 2eecf9ce..f341737c 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -116,7 +116,7 @@ SetPortValue::apply(RunContext& context) if (!buf->append_event(_time - context.start(), _value.size(), _value.type(), - (const uint8_t*)_value.get_body())) { + reinterpret_cast<const uint8_t*>(_value.get_body()))) { _status = Status::NO_SPACE; } } else if (buf->type() == uris.atom_URID) { |