summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorTim Landscheidt <tim@tim-landscheidt.de>2019-01-17 23:35:58 +0000
committerTim Landscheidt <tim@tim-landscheidt.de>2019-01-17 23:43:19 +0000
commitd0269e8c94dca6accba1d60e24ffb7f4b2f35932 (patch)
treeb73d0162dda08d83565007108d9f53c00e991e6e /src/textual.cc
parent2a8f433c6b8b2a9f2c182de17315bf5eceb2dced (diff)
downloadfork-ledger-d0269e8c94dca6accba1d60e24ffb7f4b2f35932.tar.gz
fork-ledger-d0269e8c94dca6accba1d60e24ffb7f4b2f35932.tar.bz2
fork-ledger-d0269e8c94dca6accba1d60e24ffb7f4b2f35932.zip
Drop conditionals for Boost earlier than 1.49
Ledger requires Boost 1.49 or later and enforces this in CMakeLists.txt. This means BOOST_VERSION will always be 104900 or higher. Also, since Boost 1.46, BOOST_FILESYSTEM_VERSION is 3.
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 3416073b..33744ec3 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2018, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2019, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -743,17 +743,8 @@ void instance_t::include_directive(char * line)
DEBUG("textual.include", "resolved path: " << filename.string());
mask_t glob;
-#if BOOST_VERSION >= 103700
path parent_path = filename.parent_path();
-#if BOOST_VERSION >= 104600
glob.assign_glob('^' + filename.filename().string() + '$');
-#else
- glob.assign_glob('^' + filename.filename() + '$');
-#endif
-#else // BOOST_VERSION >= 103700
- path parent_path = filename.branch_path();
- glob.assign_glob('^' + filename.leaf() + '$');
-#endif // BOOST_VERSION >= 103700
bool files_found = false;
if (exists(parent_path)) {
@@ -761,21 +752,9 @@ void instance_t::include_directive(char * line)
for (filesystem::directory_iterator iter(parent_path);
iter != end;
++iter) {
-#if BOOST_VERSION <= 103500
- if (is_regular(*iter))
-#else
if (is_regular_file(*iter))
-#endif
{
-#if BOOST_VERSION >= 103700
-#if BOOST_VERSION >= 104600
string base = (*iter).path().filename().string();
-#else
- string base = (*iter).filename();
-#endif
-#else // BOOST_VERSION >= 103700
- string base = (*iter).leaf();
-#endif // BOOST_VERSION >= 103700
if (glob.match(base)) {
journal_t * journal = context.journal;
account_t * master = top_account();