From 71783b2638d0d7e5825614b67fb84e54ead52f81 Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 31 Dec 2019 08:00:31 +0100 Subject: [PATCH] Simplify storing boolean values after inquiring. --- src/config.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 53e0483..18bed01 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -145,25 +145,11 @@ void Config::generate() cout << "Post only titles? [y/n]: "; std::getline(cin, line); - if (line[0] == 'y') - { - profiledata.titles_only = true; - } - else - { - profiledata.titles_only = false; - } + profiledata.titles_only = (line[0] == 'y'); cout << "Post titles as cw? [y/n]: "; std::getline(cin, line); - if (line[0] == 'y') - { - profiledata.titles_as_cw = true; - } - else - { - profiledata.titles_as_cw = false; - } + profiledata.titles_as_cw = (line[0] == 'y'); cout << "Append this string to each post: "; std::getline(cin, line);