summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-01-31 20:21:16 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-03 18:59:19 +0000
commit3cf634ef09e36e9d2bb4bdbfe393533afdefff56 (patch)
tree9c8b5e19a54f7696d9f3e17e22187b332a25ca77
parentRemove boost::filesystem in favour of std::filesystem (diff)
downloadlibdbpp-3cf634ef09e36e9d2bb4bdbfe393533afdefff56.tar.bz2
libdbpp-3cf634ef09e36e9d2bb4bdbfe393533afdefff56.tar.xz
libdbpp-3cf634ef09e36e9d2bb4bdbfe393533afdefff56.zip
Remove unnecessary calls to .string()
-rw-r--r--libdbpp/mockDatabase.cpp2
-rw-r--r--libdbpp/sqlParse.ll2
m---------libdbpp/unittests/libdbpp-postgresql0
-rw-r--r--libdbpp/unittests/testParse.cpp2
-rw-r--r--libdbpp/unittests/testUtils.cpp2
5 files changed, 4 insertions, 4 deletions
diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp
index 35fa748..bdc151c 100644
--- a/libdbpp/mockDatabase.cpp
+++ b/libdbpp/mockDatabase.cpp
@@ -46,7 +46,7 @@ void
MockDatabase::PlaySchemaScript(DB::Connection * conn, const std::filesystem::path & s) const
{
std::ifstream f;
- f.open(s.string());
+ f.open(s);
if (!f.good()) {
throw std::fstream::failure("Failed to open mock script: " + s.string());
}
diff --git a/libdbpp/sqlParse.ll b/libdbpp/sqlParse.ll
index 41d337a..e57dc6d 100644
--- a/libdbpp/sqlParse.ll
+++ b/libdbpp/sqlParse.ll
@@ -103,7 +103,7 @@ scriptdir "$SCRIPTDIR"
}
<QUOTE>{scriptdir} {
- statement += scriptDir.string();
+ statement += scriptDir;
}
<QUOTE>{quote_apos} {
diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql
-Subproject b7544cf990e782cec92a69555ab9dacd3f2d596
+Subproject fa73227160d97e98eb8be2aac22fa9a70f0068a
diff --git a/libdbpp/unittests/testParse.cpp b/libdbpp/unittests/testParse.cpp
index 491e8e6..dcd11d6 100644
--- a/libdbpp/unittests/testParse.cpp
+++ b/libdbpp/unittests/testParse.cpp
@@ -15,7 +15,7 @@ BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(SQLs);
class RecordingParser : std::fstream, public DB::SqlParse {
public:
RecordingParser(const std::filesystem::path & p) :
- std::fstream(p.string()),
+ std::fstream(p),
DB::SqlParse(*this, p.parent_path())
{
}
diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp
index 1911d9f..8c6a1bd 100644
--- a/libdbpp/unittests/testUtils.cpp
+++ b/libdbpp/unittests/testUtils.cpp
@@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE( extract )
BOOST_AUTO_TEST_CASE( bulkLoadStream )
{
- std::ifstream in((rootDir / "source.dat").string());
+ std::ifstream in(rootDir / "source.dat");
auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock"));
db->beginBulkUpload("bulk1", "");
BOOST_REQUIRE_EQUAL(56, db->bulkUploadData(in));