From 44986c79769d4efc2badc5b9c3df2e75e81ac28e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 29 Sep 2022 12:41:07 +0100 Subject: Use auto instead of type names where the type is obvious. --- include/extensible.h | 2 +- include/parammode.h | 2 +- include/stdalgo.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/extensible.h b/include/extensible.h index 7e6fd2f78..09eebf10d 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -245,7 +245,7 @@ public: if (container->extype != this->extype) return; - T* old = static_cast(SetRaw(container, value)); + auto old = static_cast(SetRaw(container, value)); Delete(container, old); if (sync && synced) Sync(container, value); diff --git a/include/parammode.h b/include/parammode.h index 2f4986a9f..7be5d1a38 100644 --- a/include/parammode.h +++ b/include/parammode.h @@ -73,7 +73,7 @@ public: void GetParameter(Channel* chan, std::string& out) override { - T* mh = static_cast(this); + auto mh = static_cast(this); mh->SerializeParam(chan, ext.Get(chan), out); } }; diff --git a/include/stdalgo.h b/include/stdalgo.h index e22c03326..9543fc6b5 100644 --- a/include/stdalgo.h +++ b/include/stdalgo.h @@ -176,7 +176,7 @@ namespace stdalgo template void delete_zero(T*& pr) { - T* p = pr; + auto p = pr; pr = nullptr; delete p; } -- cgit v1.3.1-10-gc9f91