diff -r d8272984c244 src/settings_gui.cpp --- a/src/settings_gui.cpp Sun Nov 23 13:17:30 2008 +0100 +++ b/src/settings_gui.cpp Sun Nov 23 13:23:30 2008 +0100 @@ -602,21 +602,27 @@ struct PatchPage; // Forward declaration +/** Data fields for a setting (PEF_SETTING_KIND) */ +struct PatchEntrySetting { + const char *name; ///< Name of the setting + const SettingDesc *setting; ///< Setting description of the patch + uint index; ///< Index of the setting in the settings table +}; + +/** Data fields for a sub-page (PEF_SUBTREE_KIND) */ +struct PatchEntrySubtree { + PatchPage *page; ///< Pointer to the sub-page + bool folded; ///< Sub-page is folded (not visible except for its title) + StringID title; ///< Title of the sub-page +}; + /** Data structure describing either a single patch in a page, or a complete sub-page */ struct PatchEntry { uint16 flags; ///< Flags of the pach entry. @see PatchEntryFlags byte level; ///< Nesting level of this patch entry union { - struct { - const char *name; ///< Name of the setting - const SettingDesc *setting; ///< Setting description of the patch - uint index; ///< Index of the setting in the settings table - } entry; ///< Data fields if patch entry is a setting - struct { - PatchPage *page; ///< Pointer to the sub-page - bool folded; ///< Sub-page is folded (not visible except for its title) - StringID title; ///< Title of the sub-page - } sub; ///< Data fields if patch entry is a sub-page + PatchEntrySetting entry; ///< Data fields if patch entry is a setting + PatchEntrySubtree sub; ///< Data fields if patch entry is a sub-page } d; PatchEntry(const char *nm);