summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/settings.h b/src/settings.h
index 8d6f1f2..a2387ed 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -1,4 +1,5 @@
#include "command.h"
+#include "hashmap.h"
#include <stdbool.h>
#include <stdint.h>
@@ -48,25 +49,17 @@ struct setting {
/** Path of the setting. */
char path[128];
- /** Hashed path that can be used for equality checks. */
- uint32_t hash;
-
/** Value of the setting. */
struct setting_value value;
};
+HASHMAP_ENTRY_TYPE(setting_entry, struct setting);
+
/**
* A collection of settings.
*/
struct settings {
- /** Settings */
- struct setting *settings;
-
- /** Number of settings currently in collection. */
- uint32_t nsettings;
-
- /** Current capacity of collection. */
- uint32_t capacity;
+ HASHMAP(struct setting_entry) settings;
};
/**