Code cleanup

This commit is contained in:
Tristan B. Kildaire 2020-09-27 13:41:09 +02:00
parent ecb6676734
commit 99a34173b7
1 changed files with 5 additions and 1 deletions

View File

@ -219,14 +219,18 @@ void defaultConfig()
void loadConfig(string configPath)
{
/* TODO: Implement me */
/* Open the provided configuration file */
File file;
file.open(configPath);
/* Read the configuration file */
byte[] buffer;
buffer.length = file.size();
buffer = file.rawRead(buffer);
/* Close the file */
file.close();
/* Parse the JSON of the configuration file */
config = parseJSON(cast(string)buffer);
}