From 2ab027c9019b9d49fae9a56afb4fcfdee1dfe21d Mon Sep 17 00:00:00 2001 From: "@Nurullah.Damla" Date: Thu, 21 Nov 2019 13:00:08 +0100 Subject: [PATCH] Configfile Pfad im Header eingebunden (nun aenderung an einer stell moeglich) --- src/SharedMemory.cpp | 4 ++-- src/SharedMemory.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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