mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-09-21 14:40:41 +02:00
Constify Load/Save
This commit is contained in:
parent
3a83b3f66a
commit
b9880faf01
@ -253,7 +253,7 @@ void Prefs::Check(void)
|
|||||||
* Load preferences from file
|
* Load preferences from file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void Prefs::Load(char *filename)
|
void Prefs::Load(const char *filename)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
char line[256], keyword[256], value[256];
|
char line[256], keyword[256], value[256];
|
||||||
@ -405,7 +405,7 @@ void Prefs::Load(char *filename)
|
|||||||
* true: success, false: error
|
* true: success, false: error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool Prefs::Save(char *filename)
|
bool Prefs::Save(const char *filename)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
|
@ -96,8 +96,8 @@ public:
|
|||||||
Prefs();
|
Prefs();
|
||||||
bool ShowEditor(bool startup, char *prefs_name);
|
bool ShowEditor(bool startup, char *prefs_name);
|
||||||
void Check(void);
|
void Check(void);
|
||||||
void Load(char *filename);
|
void Load(const char *filename);
|
||||||
bool Save(char *filename);
|
bool Save(const char *filename);
|
||||||
|
|
||||||
bool operator==(const Prefs &rhs) const;
|
bool operator==(const Prefs &rhs) const;
|
||||||
bool operator!=(const Prefs &rhs) const;
|
bool operator!=(const Prefs &rhs) const;
|
||||||
|
@ -95,7 +95,7 @@ void Frodo::ReadyToRun(void)
|
|||||||
{
|
{
|
||||||
getcwd(AppDirPath, 256);
|
getcwd(AppDirPath, 256);
|
||||||
|
|
||||||
ThePrefs.Load((char*)PREFS_PATH);
|
ThePrefs.Load(PREFS_PATH);
|
||||||
|
|
||||||
// Create and start C64
|
// Create and start C64
|
||||||
TheC64 = new C64;
|
TheC64 = new C64;
|
||||||
@ -109,7 +109,7 @@ void Frodo::ReadyToRun(void)
|
|||||||
Prefs *Frodo::reload_prefs(void)
|
Prefs *Frodo::reload_prefs(void)
|
||||||
{
|
{
|
||||||
static Prefs newprefs;
|
static Prefs newprefs;
|
||||||
newprefs.Load((char*)PREFS_PATH);
|
newprefs.Load(PREFS_PATH);
|
||||||
return &newprefs;
|
return &newprefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user