[Pkg-javascript-commits] [node-leveldown] 386/492: tidy
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:14:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.
commit b8f01a1c04cd1c47bb5549074124a1f56a0caa25
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Thu Aug 15 22:47:16 2013 +0100
tidy
---
src/iterator.cc | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/src/iterator.cc b/src/iterator.cc
index 7aface8..c629594 100644
--- a/src/iterator.cc
+++ b/src/iterator.cc
@@ -136,29 +136,12 @@ bool Iterator::IteratorNext (std::string& key, std::string& value) {
dbIterator->Next();
}
- // 'end' here is an inclusive test
-// int isEnd = end == NULL ? 1 : end->compare(dbIterator->key().ToString());
-
-// std::string key_ = dbIterator->key().ToString();
-
-// std::cout << "key:" << dbIterator->key().ToString() << "\n";
-// std::cout << "value:" << dbIterator->value().ToString() << "\n";
-
-// if(gt != NULL)
-// printf("gt: %s\n", gt->c_str());
-// if(gte != NULL)
-// printf("gte: %s\n", gte->c_str());
-// if(lt != NULL) {
-// printf("lt: %s\n", lt->c_str());
-// printf("lt: %d\n", lt->compare(key_));
-// }
-// if(lte != NULL)
-// printf("lte: %d\n", lte->compare(key_));
if (dbIterator->Valid()) {
std::string key_ = dbIterator->key().ToString();
int isEnd = end == NULL ? 1 : end->compare(key_);
- if((limit < 0 || ++count <= limit)
+
+ if((limit < 0 || ++count <= limit)
&& (end == NULL
|| (reverse && (isEnd <= 0))
|| (!reverse && (isEnd >= 0)))
@@ -169,7 +152,6 @@ bool Iterator::IteratorNext (std::string& key, std::string& value) {
: gte != NULL ? (gte->compare(key_) <= 0)
: true )
) {
-
if (keys)
key.assign(dbIterator->key().data(), dbIterator->key().size());
if (values)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list