Move everything under a namespace
This commit is contained in:
parent
c96b87c60a
commit
b833bfef3b
|
@ -1,5 +1,7 @@
|
|||
#include "lmdb-safe.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
void checkLMDB(MDBEnv* env, MDBDbi dbi)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
namespace LMDBSafe {
|
||||
|
||||
static string MDBError(int rc)
|
||||
{
|
||||
return mdb_strerror(rc);
|
||||
|
@ -374,3 +376,5 @@ MDBROCursor MDBROTransactionImpl::getROCursor(const MDBDbi &dbi)
|
|||
}
|
||||
return MDBROCursor(d_cursors, cursor);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
namespace LMDBSafe {
|
||||
|
||||
// apple compiler somehow has string_view even in c++11!
|
||||
#ifdef __cpp_lib_string_view
|
||||
using std::string_view;
|
||||
|
@ -620,3 +622,4 @@ public:
|
|||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "lmdb-typed.hh"
|
||||
|
||||
namespace LMDBSafe {
|
||||
|
||||
unsigned int MDBGetMaxID(MDBRWTransaction& txn, MDBDbi& dbi)
|
||||
{
|
||||
auto cursor = txn->getRWCursor(dbi);
|
||||
|
@ -11,4 +13,4 @@ unsigned int MDBGetMaxID(MDBRWTransaction& txn, MDBDbi& dbi)
|
|||
return maxid;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
#include <boost/iostreams/stream_buffer.hpp>
|
||||
#include <boost/iostreams/device/back_inserter.hpp>
|
||||
|
||||
namespace LMDBSafe {
|
||||
|
||||
/*
|
||||
Open issues:
|
||||
|
||||
Everything should go into a namespace
|
||||
What is an error? What is an exception?
|
||||
could id=0 be magic? ('no such id')
|
||||
yes
|
||||
|
@ -716,7 +717,4 @@ private:
|
|||
std::string d_name;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
static void closeTest()
|
||||
{
|
||||
|
@ -240,3 +241,4 @@ int main(int argc, char** argv)
|
|||
txn.commit();
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
void countDB(MDBEnv& env, MDBROTransaction& txn, const std::string& dbname)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#include "lmdb-safe.hh"
|
||||
using namespace std;
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
int main()
|
||||
{
|
||||
unlink("./multi");
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <sstream>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
struct Record
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <cstring>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "lmdb-safe.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
struct MDBVal
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
TEST_CASE("Most basic tests", "[mostbasic]") {
|
||||
unlink("./tests");
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
struct DNSResourceRecord
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace LMDBSafe;
|
||||
|
||||
struct Member
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue