summaryrefslogtreecommitdiff
path: root/Source/Core/Common/SettingsHandler.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-01-27 10:01:25 -0500
committerLioncash <mathew1800@gmail.com>2017-01-27 10:29:49 -0500
commit98291cd84308adcd9eed783f70e67450fa0263c8 (patch)
tree341240c232bf7795df51621f55d1e8ea77665496 /Source/Core/Common/SettingsHandler.h
parentf37c5f1f1c7f4e10bdbe8b510edf21a090842fdd (diff)
SettingsHandler: Add Open and Save member functions
Diffstat (limited to 'Source/Core/Common/SettingsHandler.h')
-rw-r--r--Source/Core/Common/SettingsHandler.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/Common/SettingsHandler.h b/Source/Core/Common/SettingsHandler.h
index 563909d118..41cd730ac1 100644
--- a/Source/Core/Common/SettingsHandler.h
+++ b/Source/Core/Common/SettingsHandler.h
@@ -6,6 +6,7 @@
#pragma once
+#include <array>
#include <string>
#include "Common/CommonTypes.h"
@@ -13,8 +14,6 @@
class SettingsHandler
{
public:
- SettingsHandler();
-
enum
{
SETTINGS_SIZE = 0x100,
@@ -22,6 +21,11 @@ public:
INITIAL_SEED = 0x73B5DBFA
};
+ SettingsHandler();
+
+ bool Open(const std::string& settings_file_path);
+ bool Save(const std::string& destination_file_path) const;
+
void AddSetting(const std::string& key, const std::string& value);
const u8* GetData() const;
@@ -34,7 +38,7 @@ public:
private:
void WriteByte(u8 b);
- u8 m_buffer[SETTINGS_SIZE];
+ std::array<u8, SETTINGS_SIZE> m_buffer;
u32 m_position, m_key;
std::string decoded;
};