summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2015-09-10 14:25:48 +0200
committerEnrico Zini <enrico@enricozini.org>2015-09-10 14:28:50 +0200
commit2f673d1e02c8ac7b229ebf88706ca45e5c542a33 (patch)
tree372bf7dba51f678cb6af226cf39039cbafcf1496
parentc47c2df9f80e30939db705b79cfbd88a7606ce00 (diff)
downloadlibept-2f673d1e02c8ac7b229ebf88706ca45e5c542a33.tar.gz
Wibble not used for axi anymore
-rw-r--r--ept/apt/apt.cc2
-rw-r--r--ept/apt/apt.h2
-rw-r--r--ept/axi/axi-test.cc13
-rw-r--r--ept/axi/axi.cc13
4 files changed, 10 insertions, 20 deletions
diff --git a/ept/apt/apt.cc b/ept/apt/apt.cc
index eba01f2..0825828 100644
--- a/ept/apt/apt.cc
+++ b/ept/apt/apt.cc
@@ -68,7 +68,7 @@ Exception::Exception(const std::string& message)
{
}
-Exception::~Exception() {}
+Exception::~Exception() noexcept {}
static void aptInit ()
{
diff --git a/ept/apt/apt.h b/ept/apt/apt.h
index 3f41f5d..e71ecf7 100644
--- a/ept/apt/apt.h
+++ b/ept/apt/apt.h
@@ -37,7 +37,7 @@ class Exception : public std::runtime_error
{
public:
Exception(const std::string& message);
- ~Exception();
+ ~Exception() noexcept override;
};
class Apt;
diff --git a/ept/axi/axi-test.cc b/ept/axi/axi-test.cc
index e8d7920..3e39b19 100644
--- a/ept/axi/axi-test.cc
+++ b/ept/axi/axi-test.cc
@@ -1,7 +1,7 @@
#include "ept/test.h"
#include "axi.h"
#include "ept/apt/apt.h"
-#include <wibble/sys/fs.h>
+#include "ept/utils/sys.h"
#include <set>
using namespace ept::tests;
@@ -10,14 +10,6 @@ using namespace ept;
namespace {
-struct DirMaker
-{
- DirMaker(const std::string& name)
- {
- wibble::sys::fs::mkdirIfMissing(name, 0755);
- }
-};
-
class Tests : public TestCase
{
using TestCase::TestCase;
@@ -26,10 +18,11 @@ class Tests : public TestCase
{
add_method("empty", []() {
// Access an empty index
- DirMaker md("xapian");
+ sys::mkdir_ifmissing("xapian", 0755);
apt::Apt apt;
axi::OverrideIndexDir oid("./empty");
wassert(actual(axi::timestamp()) == 0);
+ sys::rmdir("xapian");
});
}
} tests("axi");
diff --git a/ept/axi/axi.cc b/ept/axi/axi.cc
index 020d079..491e181 100644
--- a/ept/axi/axi.cc
+++ b/ept/axi/axi.cc
@@ -23,15 +23,12 @@
*/
#include <ept/config.h>
-#include <ept/axi/axi.h>
-
-#include <wibble/exception.h>
-#include <wibble/string.h>
-#include <wibble/sys/fs.h>
+#include "axi.h"
+#include "ept/utils/sys.h"
+#include "ept/utils/string.h"
#include <memory>
using namespace std;
-using namespace wibble;
namespace ept {
namespace axi {
@@ -50,8 +47,8 @@ std::string path_db()
time_t timestamp()
{
- string tsfile = str::joinpath(m_index_dir, "update-timestamp");
- return sys::fs::timestamp(tsfile, 0);
+ string tsfile = str::joinpath(m_index_dir, "update-timestamp");
+ return sys::timestamp(tsfile, 0);
}