From 212b0a18f36a64e7f8bbc8c7a074ca291e02d284 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 21 Nov 2020 22:54:29 +0100 Subject: [PATCH] Compatibility with GCC 7. --- src/config.cpp | 4 ++-- src/document.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 2e53016..6bcb9b3 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -104,7 +104,7 @@ Config::Config(string profile_name) const fs::path filename = get_filename(); BOOST_LOG_TRIVIAL(debug) << "Config filename is: " << filename; - ifstream file{filename.c_str()}; + ifstream file(filename.c_str()); if (file.good()) { stringstream rawjson; @@ -285,7 +285,7 @@ void Config::write() } _json[profile]["add_hashtags"] = profiledata.add_hashtags; - ofstream file{get_filename().c_str()}; + ofstream file(get_filename().c_str()); if (file.good()) { file << _json.toStyledString(); diff --git a/src/document.cpp b/src/document.cpp index 14cf788..02ef43e 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -290,7 +290,7 @@ void Document::parse_watchwords() { Json::Value json; const auto filepath = _cfg.get_config_dir() /= "watchwords.json"; - ifstream file{filepath}; + ifstream file(filepath); if (file.good()) { stringstream rawjson;