summaryrefslogtreecommitdiffstats
path: root/src/AtomReader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 19:13:33 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commit14cd32a043552d39738ae0e84e4ef8ab93783296 (patch)
tree829845243215ed3fd96ff8fd6d6f324c35a60b3e /src/AtomReader.cpp
parent88dff1aabd3c81d1d81ac256e0061b98e0d24cec (diff)
downloadingen-14cd32a043552d39738ae0e84e4ef8ab93783296.tar.gz
ingen-14cd32a043552d39738ae0e84e4ef8ab93783296.tar.bz2
ingen-14cd32a043552d39738ae0e84e4ef8ab93783296.zip
Cleanup: Use "auto" to avoid repeating type names
Diffstat (limited to 'src/AtomReader.cpp')
-rw-r--r--src/AtomReader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp
index 821b52a1..8b63c749 100644
--- a/src/AtomReader.cpp
+++ b/src/AtomReader.cpp
@@ -51,8 +51,8 @@ AtomReader::get_atom(const LV2_Atom* in, Atom& out)
{
if (in) {
if (in->type == _uris.atom_URID) {
- const LV2_Atom_URID* urid = (const LV2_Atom_URID*)in;
- const char* uri = _map.unmap_uri(urid->body);
+ const auto* const urid = reinterpret_cast<const LV2_Atom_URID*>(in);
+ const char* const uri = _map.unmap_uri(urid->body);
if (uri) {
out = Atom(sizeof(int32_t), _uris.atom_URID, &urid->body);
} else {
@@ -141,7 +141,7 @@ AtomReader::is_message(const URIs& uris, const LV2_Atom* msg)
return false;
}
- const LV2_Atom_Object* obj = (const LV2_Atom_Object*)msg;
+ const auto* obj = (const LV2_Atom_Object*)msg;
return (obj->body.otype == uris.patch_Get ||
obj->body.otype == uris.patch_Delete ||
obj->body.otype == uris.patch_Put ||
@@ -159,9 +159,9 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id)
return false;
}
- const LV2_Atom_Object* obj = (const LV2_Atom_Object*)msg;
- const LV2_Atom* subject = nullptr;
- const LV2_Atom* number = nullptr;
+ const auto* obj = (const LV2_Atom_Object*)msg;
+ const LV2_Atom* subject = nullptr;
+ const LV2_Atom* number = nullptr;
lv2_atom_object_get(obj,
(LV2_URID)_uris.patch_subject, &subject,