From 6638c847c6061f5248e7fe0f7b86f3ff744fa259 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Sat, 17 Aug 2024 17:56:24 +0100 Subject: [PATCH] Fix build in vs. Upgrade to c++20? --- Src/Sound/MPEG/MpegAudio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Sound/MPEG/MpegAudio.cpp b/Src/Sound/MPEG/MpegAudio.cpp index 2de1d0e..0e71e01 100644 --- a/Src/Sound/MPEG/MpegAudio.cpp +++ b/Src/Sound/MPEG/MpegAudio.cpp @@ -74,7 +74,7 @@ static FileContents LoadFile(const std::string &filepath) if (!fp) { ErrorLog("Unable to load music track from disk: %s.", filepath.c_str()); - return { .bytes = nullptr, .size = 0 }; + return { nullptr, 0 }; } fseek(fp, 0, SEEK_END); long file_size = ftell(fp); @@ -82,7 +82,7 @@ static FileContents LoadFile(const std::string &filepath) std::shared_ptr mpeg_data(new uint8_t[file_size], std::default_delete()); fread(mpeg_data.get(), sizeof(uint8_t), file_size, fp); fclose(fp); - return { .bytes = mpeg_data, .size = size_t(file_size) }; + return { mpeg_data, size_t(file_size) }; } void MpegDec::LoadCustomTracks(const std::string &music_filepath, const Game &game)