diff --git a/src/SharedMemory.cpp b/src/SharedMemory.cpp index 81a43a2..2619e92 100644 --- a/src/SharedMemory.cpp +++ b/src/SharedMemory.cpp @@ -21,7 +21,7 @@ key_t changedKey() keyFile << newKey; keyFile.close(); - auto config = cpptoml::parse_file("res/config.toml"); + auto config = cpptoml::parse_file(configFile); newKey = config->get_as("newKey").value_or(0); //toml return key_t(newKey); @@ -93,7 +93,7 @@ void deleteSharedMemory(void) } void getConfig(){ - auto config = cpptoml::parse_file("res/config.toml"); + auto config = cpptoml::parse_file(configFile); int layoutVersion = config->get_as("layoutVersion").value_or(0); int width = config->get_as("width").value_or(0); diff --git a/src/SharedMemory.h b/src/SharedMemory.h index 32732d4..e747abb 100644 --- a/src/SharedMemory.h +++ b/src/SharedMemory.h @@ -15,5 +15,5 @@ void initSharedMemory(void); key_t changedKey(); std::string getAnswerFromUser(); //Config File -#define configFile "res/config.toml"; +#define configFile "res/config.toml" #endif //SHARED_MEMORY_H