Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlesDD committed Mar 22, 2024
1 parent 7bc3f6a commit 155bbe0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/api/array_join.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const int DEFAULT_JOIN_SEPARATOR_LENGTH = 1;

void copyRangesWithOffset(Transaction* transaction,
SharedRanges* origRanges,
SharedRanges* &destRanges,
SharedRanges** destRanges,
int offset) {
if (origRanges != nullptr) {
auto end = origRanges->end();
Expand All @@ -41,10 +41,10 @@ void copyRangesWithOffset(Transaction* transaction,
origRange->inputInfo,
origRange->secureMarks);
if (newRange != nullptr) {
if (destRanges == nullptr) {
destRanges = transaction->GetSharedVectorRange();
}
destRanges->PushBack(newRange);
if (*destRanges == nullptr) {
*destRanges = transaction->GetSharedVectorRange();
}
(*destRanges)->PushBack(newRange);
} else {
break;
}
Expand All @@ -62,15 +62,15 @@ SharedRanges* getJoinResultRanges(Isolate* isolate,
auto context = isolate->GetCurrentContext();
for (uint32_t i = 0; i < length; i++) {
if (i > 0) {
copyRangesWithOffset(transaction, separatorRanges, newRanges, offset);
copyRangesWithOffset(transaction, separatorRanges, &newRanges, offset);
offset += separatorLength;
}
auto maybeItem = arr->Get(context, i);
if (!maybeItem.IsEmpty()) {
auto item = maybeItem.ToLocalChecked();
auto taintedItem = transaction->FindTaintedObject(utils::GetLocalPointer(item));
auto itemRanges = taintedItem ? taintedItem->getRanges() : nullptr;
copyRangesWithOffset(transaction, itemRanges, newRanges, offset);
copyRangesWithOffset(transaction, itemRanges, &newRanges, offset);
offset += utils::GetLength(isolate, item);
}
}
Expand All @@ -90,9 +90,9 @@ void ArrayJoinOperator(const FunctionCallbackInfo<Value>& args) {
v8::NewStringType::kNormal).ToLocalChecked()));
return;
}

auto result = args[1];

if (!result->IsString()) {
args.GetReturnValue().Set(result);
return;
Expand Down

0 comments on commit 155bbe0

Please sign in to comment.