mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
Use std::unordered_set
This commit is contained in:
parent
a457d5ad4d
commit
54a34119f3
4 changed files with 5 additions and 27 deletions
|
@ -134,12 +134,6 @@ AC_CHECK_HEADERS([sys/personality.h])
|
||||||
AC_CHECK_HEADERS([linux/fs.h])
|
AC_CHECK_HEADERS([linux/fs.h])
|
||||||
|
|
||||||
|
|
||||||
# Check for tr1/unordered_set.
|
|
||||||
AC_LANG_PUSH(C++)
|
|
||||||
AC_CHECK_HEADERS([tr1/unordered_set])
|
|
||||||
AC_LANG_POP(C++)
|
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([NEED_PROG],
|
AC_DEFUN([NEED_PROG],
|
||||||
[
|
[
|
||||||
AC_PATH_PROG($1, $2)
|
AC_PATH_PROG($1, $2)
|
||||||
|
|
|
@ -3,10 +3,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <unordered_set>
|
||||||
#if HAVE_TR1_UNORDERED_SET
|
|
||||||
#include <tr1/unordered_set>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "types.hh"
|
#include "types.hh"
|
||||||
|
|
||||||
|
@ -70,11 +67,7 @@ inline std::ostream & operator << (std::ostream & str, const Symbol & sym)
|
||||||
class SymbolTable
|
class SymbolTable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
#if HAVE_TR1_UNORDERED_SET
|
typedef std::unordered_set<string> Symbols;
|
||||||
typedef std::tr1::unordered_set<string> Symbols;
|
|
||||||
#else
|
|
||||||
typedef std::set<string> Symbols;
|
|
||||||
#endif
|
|
||||||
Symbols symbols;
|
Symbols symbols;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
#include "store-api.hh"
|
#include "store-api.hh"
|
||||||
#include "util.hh"
|
#include "util.hh"
|
||||||
#include "pathlocks.hh"
|
#include "pathlocks.hh"
|
||||||
|
|
||||||
#if HAVE_TR1_UNORDERED_SET
|
|
||||||
#include <tr1/unordered_set>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class sqlite3;
|
class sqlite3;
|
||||||
class sqlite3_stmt;
|
class sqlite3_stmt;
|
||||||
|
@ -306,11 +302,7 @@ private:
|
||||||
|
|
||||||
void checkDerivationOutputs(const Path & drvPath, const Derivation & drv);
|
void checkDerivationOutputs(const Path & drvPath, const Derivation & drv);
|
||||||
|
|
||||||
#if HAVE_TR1_UNORDERED_SET
|
typedef std::unordered_set<ino_t> InodeHash;
|
||||||
typedef std::tr1::unordered_set<ino_t> InodeHash;
|
|
||||||
#else
|
|
||||||
typedef std::set<ino_t> InodeHash;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
InodeHash loadInodeHash();
|
InodeHash loadInodeHash();
|
||||||
Strings readDirectoryIgnoringInodes(const Path & path, const InodeHash & inodeHash);
|
Strings readDirectoryIgnoringInodes(const Path & path, const InodeHash & inodeHash);
|
||||||
|
|
|
@ -21,8 +21,7 @@ libstore_CXXFLAGS = \
|
||||||
-DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
|
-DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
|
||||||
-DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
|
-DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
|
||||||
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
|
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
|
||||||
-DNIX_BIN_DIR=\"$(bindir)\" \
|
-DNIX_BIN_DIR=\"$(bindir)\"
|
||||||
-DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
|
|
||||||
|
|
||||||
$(d)/local-store.cc: $(d)/schema.sql.hh
|
$(d)/local-store.cc: $(d)/schema.sql.hh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue