From d2b6f79835ce3778cd6d589fc9273a4429eecdc6 Mon Sep 17 00:00:00 2001 From: Jookia <166291@gmail.com> Date: Mon, 1 Jul 2019 15:54:30 +1000 Subject: [PATCH] CConfigFile: Implement write_bool_entry --- LibCore/CConfigFile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LibCore/CConfigFile.cpp b/LibCore/CConfigFile.cpp index 39151d24c9..e4b8453dd7 100644 --- a/LibCore/CConfigFile.cpp +++ b/LibCore/CConfigFile.cpp @@ -150,6 +150,10 @@ void CConfigFile::write_num_entry(const String& group, const String& key, int va { write_entry(group, key, String::format("%d", value)); } +void CConfigFile::write_bool_entry(const String& group, const String& key, bool value) +{ + write_entry(group, key, value ? "1" : "0"); +} void CConfigFile::write_color_entry(const String& group, const String& key, Color value) { write_entry(group, key, String::format("%d,%d,%d,%d", value.red(), value.green(), value.blue(), value.alpha()));