Skip to content

Commit 4b06714

Browse files
author
Jinglei Ren
committed
Minor change: uses size_t instead of signed int for index/comparison.
1 parent 8702596 commit 4b06714

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CC=g++
22
CFLAGS=-std=c++11 -g -Wall -pthread -I./
3-
LDFLAGS= -L/home/basicthinker/Projects/sitevm_dune-master/bin -L/home/basicthinker/Projects/dune/libdune -lpthread -ltbb -lsitevm -ldune
3+
LDFLAGS= -L/home/jinglei/Projects/sitevm_dune-master/bin -L/home/jinglei/Projects/dune/libdune -lpthread -ltbb -lsitevm -ldune
44
SUBDIRS=core db
55
SUBSRCS=$(wildcard core/*.cc) $(wildcard db/*.cc)
66
OBJECTS=$(SUBSRCS:.cc=.o)

db/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CC=g++
22
CFLAGS=-std=c++11 -c -g -Wall
3-
INCLUDES=-I../ -I/home/basicthinker/Projects/sitevm_dune-master -I/home/basicthinker/Projects/vm-persistence
3+
INCLUDES=-I../ -I/home/jinglei/Projects/sitevm_dune-master -I/home/jinglei/Projects/vm-persistence
44
SOURCES=$(wildcard *.cc)
55
OBJECTS=$(SOURCES:.cc=.o)
66

lib/stl_hashtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ V StlHashtable<V, MA, PA>::Remove(const char *key) {
8585

8686
template<class V, class MA, class PA>
8787
std::vector<typename StlHashtable<V, MA, PA>::KVPair>
88-
StlHashtable<V, MA, PA>::Entries(const char *key, size_t n) const {
88+
StlHashtable<V, MA, PA>::Entries(const char *key, std::size_t n) const {
8989
std::vector<KVPair> pairs;
9090
typename Hashtable::const_iterator pos;
9191
if (!key) {
9292
pos = table_.cbegin();
9393
} else {
9494
pos = table_.find(String::Wrap(key));
9595
}
96-
for (int i = 0; pos != table_.end() && i < n; ++pos, ++i) {
96+
for (std::size_t i = 0; pos != table_.end() && i < n; ++pos, ++i) {
9797
pairs.push_back(std::make_pair(pos->first.value(), pos->second));
9898
}
9999
return pairs;

lib/tbb_rand_hashtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ V TbbRandHashtable<V>::Remove(const char *key) {
8484

8585
template<class V>
8686
std::vector<typename TbbRandHashtable<V>::KVPair> TbbRandHashtable<V>::Entries(
87-
const char *key, size_t n) const {
87+
const char *key, std::size_t n) const {
8888
std::vector<KVPair> pairs;
8989
typename Hashtable::const_iterator pos;
9090
tbb::queuing_rw_mutex::scoped_lock lock(mutex_);
9191
pos = key ? table_.equal_range(String::Wrap(key)).first : table_.begin();
92-
for (int i = 0; pos != table_.end() && i < n; ++pos, ++i) {
92+
for (std::size_t i = 0; pos != table_.end() && i < n; ++pos, ++i) {
9393
pairs.push_back(std::make_pair(pos->first.value(), pos->second));
9494
}
9595
return pairs;

lib/tbb_scan_hashtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ V TbbScanHashtable<V>::Remove(const char *key) {
8484

8585
template<class V>
8686
std::vector<typename TbbScanHashtable<V>::KVPair> TbbScanHashtable<V>::Entries(
87-
const char *key, size_t n) const {
87+
const char *key, std::size_t n) const {
8888
std::vector<KVPair> pairs;
8989
typename Hashtable::const_iterator pos;
9090
tbb::queuing_rw_mutex::scoped_lock lock(mutex_, false);
9191
pos = key ? table_.equal_range(String::Wrap(key)).first : table_.begin();
92-
for (int i = 0; pos != table_.end() && i < n; ++pos, ++i) {
92+
for (std::size_t i = 0; pos != table_.end() && i < n; ++pos, ++i) {
9393
pairs.push_back(std::make_pair(pos->first.value(), pos->second));
9494
}
9595
return pairs;

0 commit comments

Comments
 (0)