From 691631bd5a5d9cba7df0156cf53bac06646f3c61 Mon Sep 17 00:00:00 2001 From: Evgueni Ovtchinnikov Date: Thu, 23 Nov 2023 17:21:52 +0000 Subject: [PATCH] replaced C-style casts with reinterpret_cast in cgadgetron.cpp --- src/xGadgetron/cGadgetron/cgadgetron.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xGadgetron/cGadgetron/cgadgetron.cpp b/src/xGadgetron/cGadgetron/cgadgetron.cpp index 81c3c8a17..8558c7ec1 100644 --- a/src/xGadgetron/cGadgetron/cgadgetron.cpp +++ b/src/xGadgetron/cGadgetron/cgadgetron.cpp @@ -568,8 +568,8 @@ cGT_ISMRMRDAcquisitionsFromFile(const char* file, int all, size_t ptr) if (!file_exists(file)) return fileNotFound(file, __FILE__, __LINE__); try { - unsigned long int* ptr_ignored = (unsigned long int*)ptr; - unsigned long int ignored = *ptr_ignored; + auto ptr_ignored = reinterpret_cast(ptr); + auto ignored = *ptr_ignored; std::cout << "reading from " << file << " using ignore mask "; IgnoreMask mask; if (all) @@ -727,7 +727,7 @@ cGT_setAcquisitionsIgnoreMask(void* ptr_acqs, size_t ptr_im) objectFromHandle(h_acqs); shared_ptr sptr_acq(new ISMRMRD::Acquisition); - unsigned long int im = *(unsigned long int*)ptr_im; + auto im = *reinterpret_cast(ptr_im); acqs.set_ignore_mask(im); return new DataHandle; } @@ -744,7 +744,7 @@ cGT_acquisitionsIgnoreMask(void* ptr_acqs, size_t ptr_im) objectFromHandle(h_acqs); shared_ptr sptr_acq(new ISMRMRD::Acquisition); - unsigned long int* im = (unsigned long int*)ptr_im; + auto im = reinterpret_cast(ptr_im); *im = acqs.ignore_mask().bits(); return new DataHandle; }