[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
210/376: Inline Bindings::find()
From: |
Ludovic Courtès |
Subject: |
210/376: Inline Bindings::find() |
Date: |
Wed, 28 Jan 2015 22:05:06 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 93e4f01ee3ea33f47ade8530e5fa78346008ea6e
Author: Eelco Dolstra <address@hidden>
Date: Fri Sep 19 16:56:13 2014 +0200
Inline Bindings::find()
---
src/libexpr/eval.cc | 9 ---------
src/libexpr/eval.hh | 9 ++++++++-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index b07d210..cf8aafa 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -32,15 +32,6 @@
namespace nix {
-Bindings::iterator Bindings::find(const Symbol & name)
-{
- Attr key(name, 0);
- iterator i = std::lower_bound(begin(), end(), key);
- if (i != end() && i->name == name) return i;
- return end();
-}
-
-
void Bindings::sort()
{
std::sort(begin(), end());
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 3ac40ed..dcd6209 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -57,7 +57,14 @@ public:
attrs[size_++] = attr;
}
- iterator find(const Symbol & name);
+ iterator find(const Symbol & name)
+ {
+ Attr key(name, 0);
+ iterator i = std::lower_bound(begin(), end(), key);
+ if (i != end() && i->name == name) return i;
+ return end();
+ }
+
iterator begin() { return &attrs[0]; }
iterator end() { return &attrs[size_]; }
- 195/376: Make troubleshooting an appendix, (continued)
- 195/376: Make troubleshooting an appendix, Ludovic Courtès, 2015/01/28
- 197/376: Remove unhelpful suggestion, Ludovic Courtès, 2015/01/28
- 196/376: Delete bugs.xml, Ludovic Courtès, 2015/01/28
- 183/376: Manual build fixes, Ludovic Courtès, 2015/01/28
- 203/376: Remove unused w3m dependency, Ludovic Courtès, 2015/01/28
- 182/376: Merge branch 'master' of github.com:thatdocslady/nix, Ludovic Courtès, 2015/01/28
- 207/376: Remove debug statement, Ludovic Courtès, 2015/01/28
- 204/376: Install some pkgconfig files, Ludovic Courtès, 2015/01/28
- 206/376: Store.so: Add dependency on libnixutil, Ludovic Courtès, 2015/01/28
- 200/376: Add some instrumentation for debugging GC leaks, Ludovic Courtès, 2015/01/28
- 210/376: Inline Bindings::find(),
Ludovic Courtès <=
- 202/376: On Linux, disable address space randomization, Ludovic Courtès, 2015/01/28
- 205/376: Update spec file, Ludovic Courtès, 2015/01/28
- 201/376: Add Make flag to disable optimization, Ludovic Courtès, 2015/01/28
- 213/376: configure: Force regeneration of Makefile.config, Ludovic Courtès, 2015/01/28
- 212/376: attrNames: Don't allocate duplicates of the symbols, Ludovic Courtès, 2015/01/28
- 216/376: Handle cycles when printing a value, Ludovic Courtès, 2015/01/28
- 211/376: Fix off-by-one, Ludovic Courtès, 2015/01/28
- 215/376: Add ‘seq’ primop, Ludovic Courtès, 2015/01/28
- 209/376: Store Attrs inside Bindings, Ludovic Courtès, 2015/01/28
- 208/376: Remove bogus comment, Ludovic Courtès, 2015/01/28