diff options
author | David Robillard <d@drobilla.net> | 2017-12-18 00:45:27 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-01-12 18:20:04 +0100 |
commit | 8c19e157e148efb59d6ea2f815783755b6075c7e (patch) | |
tree | 094a95326138dd3a46cbd52b84981e36faebc64a /src | |
parent | 967a8b9d6690a5ece385d07af04c322d645de23f (diff) | |
download | ingen-8c19e157e148efb59d6ea2f815783755b6075c7e.tar.gz ingen-8c19e157e148efb59d6ea2f815783755b6075c7e.tar.bz2 ingen-8c19e157e148efb59d6ea2f815783755b6075c7e.zip |
Rename Atom::get_body to Atom::body and use Atom::ptr consistently
Diffstat (limited to 'src')
-rw-r--r-- | src/AtomWriter.cpp | 4 | ||||
-rw-r--r-- | src/Configuration.cpp | 2 | ||||
-rw-r--r-- | src/Forge.cpp | 6 | ||||
-rw-r--r-- | src/Serialiser.cpp | 6 | ||||
-rw-r--r-- | src/gui/NodeModule.cpp | 2 | ||||
-rw-r--r-- | src/server/ControlBindings.cpp | 2 | ||||
-rw-r--r-- | src/server/LV2Block.cpp | 2 | ||||
-rw-r--r-- | src/server/RunContext.cpp | 2 | ||||
-rw-r--r-- | src/server/events/SetPortValue.cpp | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/src/AtomWriter.cpp b/src/AtomWriter.cpp index 015e5fc7..0cc90714 100644 --- a/src/AtomWriter.cpp +++ b/src/AtomWriter.cpp @@ -134,7 +134,7 @@ AtomWriter::forge_properties(ScopedObject& object, const Properties& properties) if (p.second.type() == _forge.URI) { forge_uri(URI(p.second.ptr<char>())); } else { - _forge.atom(p.second.size(), p.second.type(), p.second.get_body()); + _forge.atom(p.second.size(), p.second.type(), p.second.body()); } } } @@ -360,7 +360,7 @@ AtomWriter::operator()(const SetProperty& message) const auto& value = message.value; msg.object.key(_uris.patch_value); - _forge.atom(value.size(), value.type(), value.get_body()); + _forge.atom(value.size(), value.type(), value.body()); } /** @page protocol diff --git a/src/Configuration.cpp b/src/Configuration.cpp index c05c516e..f6d02c18 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -327,7 +327,7 @@ Configuration::save(URIMap& uri_map, SerdNode pred = serd_node_from_string( SERD_CURIE, (const uint8_t*)key.c_str()); sratom_write(sratom, &uri_map.urid_unmap_feature()->urid_unmap, 0, - &base, &pred, value.type(), value.size(), value.get_body()); + &base, &pred, value.type(), value.size(), value.body()); } sratom_free(sratom); diff --git a/src/Forge.cpp b/src/Forge.cpp index fbebbeb5..f54a3cc4 100644 --- a/src/Forge.cpp +++ b/src/Forge.cpp @@ -48,7 +48,7 @@ Forge::str(const Atom& atom, bool quoted) ss << (atom.get<int32_t>() ? "true" : "false"); } else if (atom.type() == URI) { ss << (quoted ? "<" : "") - << atom.ptr<const char>() + << atom.ptr<char>() << (quoted ? ">" : ""); } else if (atom.type() == URID) { ss << (quoted ? "<" : "") @@ -56,11 +56,11 @@ Forge::str(const Atom& atom, bool quoted) << (quoted ? ">" : ""); } else if (atom.type() == Path) { ss << (quoted ? "<" : "") - << atom.ptr<const char>() + << atom.ptr<char>() << (quoted ? ">" : ""); } else if (atom.type() == String) { ss << (quoted ? "\"" : "") - << atom.ptr<const char>() + << atom.ptr<char>() << (quoted ? "\"" : ""); } return ss.str(); diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp index 36d4a87f..858e7f2d 100644 --- a/src/Serialiser.cpp +++ b/src/Serialiser.cpp @@ -557,7 +557,7 @@ Serialiser::Impl::serialise_properties(Sord::Node id, const Sord::URI key(_model->world(), p.first); if (!skip_property(_world.uris(), key)) { if (p.second.type() == _world.uris().atom_URI && - !strncmp((const char*)p.second.get_body(), "ingen:/main/", 13)) { + !strncmp(p.second.ptr<char>(), "ingen:/main/", 13)) { /* Value is a graph URI relative to the running engine. Chop the prefix and save the path relative to the graph file. This allows saving references to bundle resources. */ @@ -565,12 +565,12 @@ Serialiser::Impl::serialise_properties(Sord::Node id, sord_node_to_serd_node(id.c_obj()), sord_node_to_serd_node(key.c_obj()), p.second.type(), p.second.size(), - (const char*)p.second.get_body() + 13); + p.second.ptr<char>() + 13); } else { sratom_write(_sratom, unmap, 0, sord_node_to_serd_node(id.c_obj()), sord_node_to_serd_node(key.c_obj()), - p.second.type(), p.second.size(), p.second.get_body()); + p.second.type(), p.second.size(), p.second.body()); } } } diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 8605e91d..c73cb91e 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -222,7 +222,7 @@ NodeModule::port_value_changed(uint32_t index, const Atom& value) if (value.type() == uris.atom_Float && _block->get_port(index)->is_numeric()) { - _plugin_ui->port_event(index, sizeof(float), 0, value.ptr<float>()); + _plugin_ui->port_event(index, sizeof(float), 0, value.body()); } else { _plugin_ui->port_event(index, lv2_atom_total_size(value.atom()), diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 2a269cac..67842291 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -69,7 +69,7 @@ ControlBindings::binding_key(const Atom& binding) const LV2_Atom* num = nullptr; if (binding.type() == uris.atom_Object) { const LV2_Atom_Object_Body* obj = (const LV2_Atom_Object_Body*) - binding.get_body(); + binding.body(); if (obj->otype == uris.midi_Bender) { key = Key(Type::MIDI_BENDER); } else if (obj->otype == uris.midi_ChannelPressure) { diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index 765643d6..fd555c7f 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -669,7 +669,7 @@ get_port_value(const char* port_symbol, if (port && port->is_input() && port->value().is_valid()) { *size = port->value().size(); *type = port->value().type(); - return port->value().get_body(); + return port->value().body(); } return nullptr; diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp index ee272d46..6efc81ee 100644 --- a/src/server/RunContext.cpp +++ b/src/server/RunContext.cpp @@ -116,7 +116,7 @@ RunContext::emit_notifications(FrameTime end) if (_event_sink->read(sizeof(note), ¬e) == sizeof(note)) { Atom value = _engine.world()->forge().alloc( note.size, note.type, nullptr); - if (_event_sink->read(note.size, value.get_body()) == note.size) { + if (_event_sink->read(note.size, value.body()) == note.size) { i += note.size; const char* key = _engine.world()->uri_map().unmap_uri(note.key); if (key) { diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index fa36d739..c0087d8f 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -112,7 +112,7 @@ SetPortValue::apply(RunContext& context) if (!buf->append_event(_time - context.start(), _value.size(), _value.type(), - (const uint8_t*)_value.get_body())) { + (const uint8_t*)_value.body())) { _status = Status::NO_SPACE; } } else if (buf->type() == uris.atom_URID) { |