mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 21:48:35 -07:00
SavedStruct: Introduce saved_struct_get_metadata (#3392)
* SavedStruct: Replace saved_struct_get_payload_size with saved_struct_get_metadata This new function can obtain the magic value, version and payload size all at once. This makes the function useful e.g. for backwards compatibility. * SavedStruct: const-qualify saved_struct_save * Toolbox: add saved struct documentation Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ bool expansion_settings_load(ExpansionSettings* settings) {
|
||||
EXPANSION_SETTINGS_VERSION);
|
||||
}
|
||||
|
||||
bool expansion_settings_save(ExpansionSettings* settings) {
|
||||
bool expansion_settings_save(const ExpansionSettings* settings) {
|
||||
furi_assert(settings);
|
||||
return saved_struct_save(
|
||||
EXPANSION_SETTINGS_PATH,
|
||||
|
||||
@@ -36,7 +36,7 @@ bool expansion_settings_load(ExpansionSettings* settings);
|
||||
* @param[in] settings pointer to an ExpansionSettings instance to save settings from.
|
||||
* @returns true if the settings were successfully saved, false otherwise.
|
||||
*/
|
||||
bool expansion_settings_save(ExpansionSettings* settings);
|
||||
bool expansion_settings_save(const ExpansionSettings* settings);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user