include/vcl/event.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 491d62a90a951fcba483c14900eb21213de73e22 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Nov 7 15:01:25 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Nov 8 09:22:05 2023 +0100 loplugin:fieldcast in DataChangedEvent Change-Id: Ida928723e02643abfd01a42e22e12d60d78c72e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159095 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 58a90b2a764a..83ff1f059e0e 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -350,13 +350,13 @@ enum class DataChangedEventType { class VCL_DLLPUBLIC DataChangedEvent { private: - void* mpData; + const AllSettings* mpData; AllSettingsFlags mnFlags; DataChangedEventType mnType; public: explicit DataChangedEvent( DataChangedEventType nType, - const void* pData = nullptr, + const AllSettings* pData = nullptr, AllSettingsFlags nFlags = AllSettingsFlags::NONE ); DataChangedEventType GetType() const { return mnType; } @@ -366,10 +366,10 @@ public: }; inline DataChangedEvent::DataChangedEvent( DataChangedEventType nType, - const void* pData, + const AllSettings* pData, AllSettingsFlags nChangeFlags ) { - mpData = const_cast<void*>(pData); + mpData = pData; mnFlags = nChangeFlags; mnType = nType; } @@ -377,7 +377,7 @@ inline DataChangedEvent::DataChangedEvent( DataChangedEventType nType, inline const AllSettings* DataChangedEvent::GetOldSettings() const { if ( mnType == DataChangedEventType::SETTINGS ) - return static_cast<const AllSettings*>(mpData); + return mpData; else return nullptr; }