[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/376: Use std::unordered_set
From: |
Ludovic Courtès |
Subject: |
14/376: Use std::unordered_set |
Date: |
Wed, 28 Jan 2015 22:03:43 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 54a34119f349d531557af9e90d21d04d689ee817
Author: Eelco Dolstra <address@hidden>
Date: Mon May 26 17:53:17 2014 +0200
Use std::unordered_set
---
configure.ac | 6 ------
src/libexpr/symbol-table.hh | 11 ++---------
src/libstore/local-store.hh | 12 ++----------
src/libstore/local.mk | 3 +--
4 files changed, 5 insertions(+), 27 deletions(-)
diff --git a/configure.ac b/configure.ac
index 043aed5..55e6191 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,12 +134,6 @@ AC_CHECK_HEADERS([sys/personality.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_PATH_PROG($1, $2)
diff --git a/src/libexpr/symbol-table.hh b/src/libexpr/symbol-table.hh
index 08e31d4..140662b 100644
--- a/src/libexpr/symbol-table.hh
+++ b/src/libexpr/symbol-table.hh
@@ -3,10 +3,7 @@
#include "config.h"
#include <map>
-
-#if HAVE_TR1_UNORDERED_SET
-#include <tr1/unordered_set>
-#endif
+#include <unordered_set>
#include "types.hh"
@@ -70,11 +67,7 @@ inline std::ostream & operator << (std::ostream & str, const
Symbol & sym)
class SymbolTable
{
private:
-#if HAVE_TR1_UNORDERED_SET
- typedef std::tr1::unordered_set<string> Symbols;
-#else
- typedef std::set<string> Symbols;
-#endif
+ typedef std::unordered_set<string> Symbols;
Symbols symbols;
public:
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 54331e4..e58e656 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -1,16 +1,12 @@
#pragma once
#include <string>
+#include <unordered_set>
#include "store-api.hh"
#include "util.hh"
#include "pathlocks.hh"
-#if HAVE_TR1_UNORDERED_SET
-#include <tr1/unordered_set>
-#endif
-
-
class sqlite3;
class sqlite3_stmt;
@@ -306,11 +302,7 @@ private:
void checkDerivationOutputs(const Path & drvPath, const Derivation & drv);
-#if HAVE_TR1_UNORDERED_SET
- typedef std::tr1::unordered_set<ino_t> InodeHash;
-#else
- typedef std::set<ino_t> InodeHash;
-#endif
+ typedef std::unordered_set<ino_t> InodeHash;
InodeHash loadInodeHash();
Strings readDirectoryIgnoringInodes(const Path & path, const InodeHash &
inodeHash);
diff --git a/src/libstore/local.mk b/src/libstore/local.mk
index 40cb25d..64dbfa3 100644
--- a/src/libstore/local.mk
+++ b/src/libstore/local.mk
@@ -21,8 +21,7 @@ libstore_CXXFLAGS = \
-DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
-DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
- -DNIX_BIN_DIR=\"$(bindir)\" \
- -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
+ -DNIX_BIN_DIR=\"$(bindir)\"
$(d)/local-store.cc: $(d)/schema.sql.hh
- 08/376: Ensure that -I flags get included in nixPath, (continued)
- 08/376: Ensure that -I flags get included in nixPath, Ludovic Courtès, 2015/01/28
- 11/376: Rephrase @ operator description, Ludovic Courtès, 2015/01/28
- 12/376: dev-shell is a bash script, not sh, Ludovic Courtès, 2015/01/28
- 09/376: Make the Nix search path declarative, Ludovic Courtès, 2015/01/28
- 03/376: Disable parallel.sh test, Ludovic Courtès, 2015/01/28
- 10/376: Remove ExprBuiltin, Ludovic Courtès, 2015/01/28
- 02/376: nix-store -l: Fetch build logs from the Internet, Ludovic Courtès, 2015/01/28
- 13/376: nix-build: --add-root also takes 1 parameter, Ludovic Courtès, 2015/01/28
- 07/376: Add constant ‘nixPath’, Ludovic Courtès, 2015/01/28
- 17/376: nix-env -qa --json: Generate valid JSON even if there are invalid meta attrs, Ludovic Courtès, 2015/01/28
- 14/376: Use std::unordered_set,
Ludovic Courtès <=
- 15/376: Sort nixPath attributes, Ludovic Courtès, 2015/01/28
- 16/376: Fix test, Ludovic Courtès, 2015/01/28
- 21/376: Add autoloads, make code more concise & idiomatic, Ludovic Courtès, 2015/01/28
- 18/376: Print a warning when loading a large path into memory, Ludovic Courtès, 2015/01/28
- 19/376: Report daemon OOM better, Ludovic Courtès, 2015/01/28
- 22/376: Share code between scopedImport and import, Ludovic Courtès, 2015/01/28
- 28/376: Only add the importNative primop if the allow-arbitrary-code-during-evaluation option is true (default false), Ludovic Courtès, 2015/01/28
- 26/376: Don't use member initialisers, Ludovic Courtès, 2015/01/28
- 27/376: Add importNative primop, Ludovic Courtès, 2015/01/28
- 29/376: Merge branch 'shlevy-import-native', Ludovic Courtès, 2015/01/28