From 4ef41be9596cf997cd80175cfc7de2074a182d0d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 1 Aug 2020 15:20:45 +0200 Subject: Use auto with casts and allocations to remove redundancy --- ingen/DataAccess.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ingen') diff --git a/ingen/DataAccess.hpp b/ingen/DataAccess.hpp index 99847896..79bb84eb 100644 --- a/ingen/DataAccess.hpp +++ b/ingen/DataAccess.hpp @@ -51,10 +51,9 @@ struct DataAccess : public ingen::LV2Features::Feature return SPtr(); } - const LV2_Descriptor* desc = lilv_instance_get_descriptor(inst); - LV2_Extension_Data_Feature* data = - static_cast( - malloc(sizeof(LV2_Extension_Data_Feature))); + const LV2_Descriptor* desc = lilv_instance_get_descriptor(inst); + auto* data = static_cast( + malloc(sizeof(LV2_Extension_Data_Feature))); data->data_access = desc->extension_data; -- cgit v1.2.1