From 24d6f58b742f965566343cdae2cbdebfe173e617 Mon Sep 17 00:00:00 2001 From: Syping Date: Sun, 8 Jan 2023 15:44:28 +0100 Subject: [PATCH] RagePhoto: fix build error for older C++ standards --- src/RagePhoto.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RagePhoto.cpp b/src/RagePhoto.cpp index 0acb2bf..092c11f 100644 --- a/src/RagePhoto.cpp +++ b/src/RagePhoto.cpp @@ -125,6 +125,7 @@ inline void uInt32ToCharLE(uint32_t x, char *y) /* BEGIN OF RAGEPHOTO CLASS */ RagePhoto::RagePhoto() { +#if __cplusplus >= 201707L m_data = new RagePhotoData { .jpeg = nullptr, .description = nullptr, @@ -135,6 +136,9 @@ RagePhoto::RagePhoto() .unnamedSum1 = 0, .unnamedSum2 = 0 }; +#else + m_data = new RagePhotoData { 0 }; +#endif setBufferDefault(); }