Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
manh9203 committed Apr 8, 2024
1 parent 898c111 commit c5e7e8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/common/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ SHA256::~SHA256() {
}

void SHA256::addString(const std::string& str) {
if (mbedtls_sha256_update(
&shaContext, reinterpret_cast<const unsigned char*>(str.data()), str.size())) {
if (mbedtls_sha256_update(&shaContext, reinterpret_cast<const unsigned char*>(str.data()),
str.size())) {
throw RuntimeException{"SHA256 Error"};
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/function/vector_hash_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ void UnaryHashFunctionExecutor::execute(ValueVector& operand, ValueVector& resul
} else {
for (auto i = 0u; i < operand.state->selVector->selectedSize; i++) {
auto pos = operand.state->selVector->selectedPositions[i];
Hash::operation(
operand.getValue<OPERAND_TYPE>(pos), resultValues[pos], &operand);
Hash::operation(operand.getValue<OPERAND_TYPE>(pos), resultValues[pos],
&operand);
}
}
} else {
if (operand.state->selVector->isUnfiltered()) {
for (auto i = 0u; i < operand.state->selVector->selectedSize; i++) {
if (!operand.isNull(i)) {
Hash::operation(
operand.getValue<OPERAND_TYPE>(i), resultValues[i], &operand);
Hash::operation(operand.getValue<OPERAND_TYPE>(i), resultValues[i],
&operand);
} else {
result.setValue(i, NULL_HASH);
}
Expand All @@ -48,8 +48,8 @@ void UnaryHashFunctionExecutor::execute(ValueVector& operand, ValueVector& resul
for (auto i = 0u; i < operand.state->selVector->selectedSize; i++) {
auto pos = operand.state->selVector->selectedPositions[i];
if (!operand.isNull(pos)) {
Hash::operation(
operand.getValue<OPERAND_TYPE>(pos), resultValues[pos], &operand);
Hash::operation(operand.getValue<OPERAND_TYPE>(pos), resultValues[pos],
&operand);
} else {
resultValues[pos] = NULL_HASH;
}
Expand Down

0 comments on commit c5e7e8e

Please sign in to comment.