Codechange: Shuffle MusicSongInfo members to reduce alignment padding. (#14580)
This commit is contained in:
@@ -33,14 +33,14 @@ 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)
|
int cat_index; ///< entry index in CAT file, for filetype==MTT_MPSMIDI
|
||||||
|
int override_start; ///< MIDI ticks to skip over in beginning
|
||||||
|
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
|
MusicTrackType filetype; ///< decoder required for song file
|
||||||
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
|
||||||
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_end; ///< MIDI tick to end the song at (0 if no override)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct BaseSetTraits<struct MusicSet> {
|
template <> struct BaseSetTraits<struct MusicSet> {
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
|
|
||||||
struct MusicSystem {
|
struct MusicSystem {
|
||||||
struct PlaylistEntry : MusicSongInfo {
|
struct PlaylistEntry : MusicSongInfo {
|
||||||
const MusicSet *set; ///< music set the song comes from
|
const MusicSet *set; ///< music set the song comes from
|
||||||
uint set_index; ///< index of song in set
|
uint set_index; ///< index of song in set
|
||||||
|
|
||||||
PlaylistEntry(const MusicSet *set, uint set_index) : MusicSongInfo(set->songinfo[set_index]), set(set), set_index(set_index) { }
|
PlaylistEntry(const MusicSet *set, uint set_index) : MusicSongInfo(set->songinfo[set_index]), set(set), set_index(set_index) { }
|
||||||
bool IsValid() const { return !this->songname.empty(); }
|
bool IsValid() const { return !this->songname.empty(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user