diff options
author | David Robillard <d@drobilla.net> | 2020-08-02 14:09:03 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 14:09:03 +0200 |
commit | 62f5c3124b991abe9b9423a4908ca076079d5327 (patch) | |
tree | 661304a2e5920c1c77f4ce61e4852cabdb250e5f /src/client/BlockModel.cpp | |
parent | 019eeff6a7d051427ad62a288f350e66471a0462 (diff) | |
download | ingen-62f5c3124b991abe9b9423a4908ca076079d5327.tar.gz ingen-62f5c3124b991abe9b9423a4908ca076079d5327.tar.bz2 ingen-62f5c3124b991abe9b9423a4908ca076079d5327.zip |
Use auto with pointer casts to remove redundancy
Diffstat (limited to 'src/client/BlockModel.cpp')
-rw-r--r-- | src/client/BlockModel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp index a4318f4e..636b3a85 100644 --- a/src/client/BlockModel.cpp +++ b/src/client/BlockModel.cpp @@ -108,7 +108,7 @@ BlockModel::add_child(const SPtr<ObjectModel>& c) //ObjectModel::add_child(c); - SPtr<PortModel> pm = std::dynamic_pointer_cast<PortModel>(c); + auto pm = std::dynamic_pointer_cast<PortModel>(c); assert(pm); add_port(pm); } @@ -121,7 +121,7 @@ BlockModel::remove_child(const SPtr<ObjectModel>& c) //bool ret = ObjectModel::remove_child(c); - SPtr<PortModel> pm = std::dynamic_pointer_cast<PortModel>(c); + auto pm = std::dynamic_pointer_cast<PortModel>(c); assert(pm); remove_port(pm); @@ -275,7 +275,7 @@ BlockModel::port_label(const SPtr<const PortModel>& port) const void BlockModel::set(const SPtr<ObjectModel>& model) { - SPtr<BlockModel> block = std::dynamic_pointer_cast<BlockModel>(model); + auto block = std::dynamic_pointer_cast<BlockModel>(model); if (block) { _plugin_uri = block->_plugin_uri; _plugin = block->_plugin; |