aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/globals.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-17 15:18:13 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-17 15:18:13 +0200
commitd37d0127742a7574d4f48860de2e82fb523e508a (patch)
treeae22136cc2fbca64a02d14fb47c596d4ea7d865f /src/libstore/globals.cc
parenteca29bd72de5fe814fd1ae8edc8c36351a0759d8 (diff)
Settings: Add bool get()
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r--src/libstore/globals.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index b410cea2e..c5abeee28 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -136,6 +136,14 @@ Strings Settings::get(const string & name, const Strings & def)
}
+bool Settings::get(const string & name, bool def)
+{
+ bool res = def;
+ _get(res, name);
+ return res;
+}
+
+
void Settings::update()
{
_get(tryFallback, "build-fallback");