diff --git a/examples/resize.cc b/examples/resize.cc index deeb704..a14f6c0 100644 --- a/examples/resize.cc +++ b/examples/resize.cc @@ -54,7 +54,7 @@ int main(int argc, char **) cout << data.get() << endl; struct Bert { - uint16_t x, y; + std::uint16_t x, y; }; auto b = data.get_struct(); cout << b.x << " " << b.y << endl; @@ -64,7 +64,7 @@ int main(int argc, char **) exit(1); } } else { - size_t size = 1ULL * 4096 * 244140ULL; + std::size_t size = 1ULL * 4096 * 244140ULL; for (unsigned int n = 0;; ++n) { if (!(n % 16384)) { size += 16384; diff --git a/examples/typed.cc b/examples/typed.cc index ef1e89c..bc328de 100644 --- a/examples/typed.cc +++ b/examples/typed.cc @@ -11,18 +11,18 @@ using namespace std; using namespace LMDBSafe; struct DNSResourceRecord { - string qname; // index - uint16_t qtype{ 0 }; - uint32_t domain_id{ 0 }; // index - string content; - uint32_t ttl{ 0 }; - string ordername; // index + std::string qname; // index + std::uint16_t qtype{ 0 }; + std::uint32_t domain_id{ 0 }; // index + std::string content; + std::uint32_t ttl{ 0 }; + std::string ordername; // index bool auth{ true }; }; struct DomainInfo { - string qname; - string master; + std::string qname; + std::string master; }; template void serialize(Archive &ar, DomainInfo &g, const unsigned int version) @@ -47,7 +47,7 @@ struct compound { std::string operator()(const DNSResourceRecord &rr) { std::string ret; - uint32_t id = htonl(rr.domain_id); + std::uint32_t id = htonl(rr.domain_id); ret.assign(reinterpret_cast(&id), 4); ret.append(rr.ordername); return ret; @@ -56,8 +56,8 @@ struct compound { int main() { - TypedDBI, - index_on, index_on_function> + TypedDBI, + index_on, index_on_function> tdbi(getMDBEnv("./typed.lmdb", MDB_NOSUBDIR, 0600), "records"); TypedDBI> tdomains(tdbi.getEnv(), "domains"); diff --git a/examples/view.cc b/examples/view.cc index 53400aa..2daa628 100644 --- a/examples/view.cc +++ b/examples/view.cc @@ -12,12 +12,12 @@ void countDB(MDBEnv &env, MDBROTransaction &txn, const std::string &dbname) CPP_UTILITIES_UNUSED(env) auto db = txn->openDB(dbname, 0); auto cursor = txn->getCursor(db); - uint32_t count = 0; + std::uint32_t count = 0; MDBOutVal key, val; while (!cursor.get(key, val, count ? MDB_NEXT : MDB_FIRST)) { - cout << key.get(); + cout << key.get(); if (key.d_mdbval.mv_size == 4) - cout << " " << key.get(); + cout << " " << key.get(); cout << ": " << val.get(); cout << "\n"; ++count;