Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 2aed22b

Browse files
committed
More PR feedback changes.
1 parent c37e6ef commit 2aed22b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/concurrency/transaction_context.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ RWType TransactionContext::GetRWType(const ItemPointer &location) {
9393
}
9494

9595
void TransactionContext::RecordRead(const ItemPointer &location) {
96-
PELOTON_ASSERT(rw_set_.count(location) == 0 ||
96+
PELOTON_ASSERT(rw_set_.find(location) == rw_set_.end() ||
9797
(rw_set_[location] != RWType::DELETE &&
9898
rw_set_[location] != RWType::INS_DEL));
9999
auto rw_set_it = rw_set_.find(location);
@@ -104,14 +104,14 @@ void TransactionContext::RecordRead(const ItemPointer &location) {
104104
}
105105

106106
void TransactionContext::RecordReadOwn(const ItemPointer &location) {
107-
PELOTON_ASSERT(rw_set_.count(location) == 0 ||
107+
PELOTON_ASSERT(rw_set_.find(location) == rw_set_.end() ||
108108
(rw_set_[location] != RWType::DELETE &&
109109
rw_set_[location] != RWType::INS_DEL));
110110
rw_set_[location] = RWType::READ_OWN;
111111
}
112112

113113
void TransactionContext::RecordUpdate(const ItemPointer &location) {
114-
PELOTON_ASSERT(rw_set_.count(location) == 0 ||
114+
PELOTON_ASSERT(rw_set_.find(location) == rw_set_.end() ||
115115
(rw_set_[location] != RWType::DELETE &&
116116
rw_set_[location] != RWType::INS_DEL));
117117
auto rw_set_it = rw_set_.find(location);
@@ -122,12 +122,12 @@ void TransactionContext::RecordUpdate(const ItemPointer &location) {
122122
}
123123

124124
void TransactionContext::RecordInsert(const ItemPointer &location) {
125-
PELOTON_ASSERT(rw_set_.count(location) == 0);
125+
PELOTON_ASSERT(rw_set_.find(location) == rw_set_.end());
126126
rw_set_[location] = RWType::INSERT;
127127
}
128128

129129
bool TransactionContext::RecordDelete(const ItemPointer &location) {
130-
PELOTON_ASSERT(rw_set_.count(location) == 0 ||
130+
PELOTON_ASSERT(rw_set_.find(location) == rw_set_.end() ||
131131
(rw_set_[location] != RWType::DELETE &&
132132
rw_set_[location] != RWType::INS_DEL));
133133
auto rw_set_it = rw_set_.find(location);

0 commit comments

Comments
 (0)