1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-22 04:32:47 +01:00

Codechange: Shuffle MusicSongInfo members to reduce alignment padding. (#14580)

This commit is contained in:
Peter Nelson
2025-09-03 18:22:50 +01:00
committed by GitHub
parent 80f672d5b4
commit f3951214c1
2 changed files with 9 additions and 9 deletions

View File

@@ -34,13 +34,13 @@ enum MusicTrackType : uint8_t {
/** Metadata about a music track. */ /** Metadata about a music track. */
struct MusicSongInfo { struct MusicSongInfo {
std::string songname; ///< name of song displayed in UI std::string songname; ///< name of song displayed in UI
uint8_t tracknr; ///< track number of song displayed in UI
std::string filename; ///< file on disk containing song (when used in MusicSet class) std::string filename; ///< file on disk containing song (when used in MusicSet class)
MusicTrackType filetype; ///< decoder required for song file
int cat_index; ///< entry index in CAT file, for filetype==MTT_MPSMIDI int cat_index; ///< entry index in CAT file, for filetype==MTT_MPSMIDI
bool loop; ///< song should play in a tight loop if possible, never ending
int override_start; ///< MIDI ticks to skip over in beginning int override_start; ///< MIDI ticks to skip over in beginning
int override_end; ///< MIDI tick to end the song at (0 if no override) int override_end; ///< MIDI tick to end the song at (0 if no override)
uint8_t tracknr; ///< track number of song displayed in UI
MusicTrackType filetype; ///< decoder required for song file
bool loop; ///< song should play in a tight loop if possible, never ending
}; };
template <> struct BaseSetTraits<struct MusicSet> { template <> struct BaseSetTraits<struct MusicSet> {