Skip to content

Commit

Permalink
Add DCHECK inside MapOfBulkStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed Jan 20, 2024
1 parent 21e286d commit a0c6b56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/redis_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ std::string Connection::SetOfBulkStrings(const std::vector<std::string> &elems)
}

std::string Connection::MapOfBulkStrings(const std::vector<std::string> &elems) const {
DCHECK(elems.size() % 2 == 0);

std::string result;
result += SizeOfMap(elems.size() / 2);
for (const auto &elem : elems) {
Expand Down

0 comments on commit a0c6b56

Please sign in to comment.