aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-02-09 09:16:13 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-02-10 12:32:52 +0100
commit056aba2b4fbdd91a4012aa38743fb8fac56d974b (patch)
tree0bbc0c040187c2b80cd961d05e09ba39179b8732 /src
parent36f9d3ae6da48325b0a37ad7fd1abe263a0f2c9a (diff)
downloadbitcoin-056aba2b4fbdd91a4012aa38743fb8fac56d974b.tar.xz
Remove fallbacks for boost_filesystem < v3
Minimum boost version was bumped to 1.47.0 in #8920, which means the configure step won't even pass with older boost. This version has boost filesystem v3, which means the (crappy) fallbacks for older versions can go.
Diffstat (limited to 'src')
-rw-r--r--src/qt/guiutil.cpp17
-rw-r--r--src/test/testutil.cpp18
-rw-r--r--src/wallet/wallet.cpp4
3 files changed, 0 insertions, 39 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 5d6c0e2e31..8b93815b7b 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -37,9 +37,7 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
-#if BOOST_FILESYSTEM_VERSION >= 3
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
-#endif
#include <boost/scoped_array.hpp>
#include <QAbstractItemView>
@@ -67,9 +65,7 @@
#include <QFontDatabase>
#endif
-#if BOOST_FILESYSTEM_VERSION >= 3
static boost::filesystem::detail::utf8_codecvt_facet utf8;
-#endif
#if defined(Q_OS_MAC)
extern double NSAppKitVersionNumber;
@@ -860,7 +856,6 @@ void setClipboard(const QString& str)
QApplication::clipboard()->setText(str, QClipboard::Selection);
}
-#if BOOST_FILESYSTEM_VERSION >= 3
boost::filesystem::path qstringToBoostPath(const QString &path)
{
return boost::filesystem::path(path.toStdString(), utf8);
@@ -870,18 +865,6 @@ QString boostPathToQString(const boost::filesystem::path &path)
{
return QString::fromStdString(path.string(utf8));
}
-#else
-#warning Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older
-boost::filesystem::path qstringToBoostPath(const QString &path)
-{
- return boost::filesystem::path(path.toStdString());
-}
-
-QString boostPathToQString(const boost::filesystem::path &path)
-{
- return QString::fromStdString(path.string());
-}
-#endif
QString formatDurationStr(int secs)
{
diff --git a/src/test/testutil.cpp b/src/test/testutil.cpp
index 304cffb798..e6d8622979 100644
--- a/src/test/testutil.cpp
+++ b/src/test/testutil.cpp
@@ -11,23 +11,5 @@
#include <boost/filesystem.hpp>
boost::filesystem::path GetTempPath() {
-#if BOOST_FILESYSTEM_VERSION == 3
return boost::filesystem::temp_directory_path();
-#else
- // TODO: remove when we don't support filesystem v2 anymore
- boost::filesystem::path path;
-#ifdef WIN32
- char pszPath[MAX_PATH] = "";
-
- if (GetTempPathA(MAX_PATH, pszPath))
- path = boost::filesystem::path(pszPath);
-#else
- path = boost::filesystem::path("/tmp");
-#endif
- if (path.empty() || !boost::filesystem::is_directory(path)) {
- LogPrintf("GetTempPath(): failed to find temp path\n");
- return boost::filesystem::path("");
- }
- return path;
-#endif
}
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index a5e8752fc0..28992ce38a 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3874,11 +3874,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
pathDest /= strWalletFile;
try {
-#if BOOST_VERSION >= 104000
boost::filesystem::copy_file(pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
-#else
- boost::filesystem::copy_file(pathSrc, pathDest);
-#endif
LogPrintf("copied %s to %s\n", strWalletFile, pathDest.string());
return true;
} catch (const boost::filesystem::filesystem_error& e) {