Skip to content

Commit

Permalink
Remove std swap function
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniciusSouzaRoque committed Nov 29, 2021
1 parent 1c29083 commit 0b9f22b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpp/src/gandiva/precompiled/string_ops.cc
Expand Up @@ -1693,6 +1693,7 @@ gdv_int32 levenshtein(int64_t context, const char* in1, int32_t in1_len, const c
// v1 -> (in2_len+1, ..., &ptr[in2_len * 2])
int* v0;
int* v1;
int* aux;
v0 = &ptr[0];
v1 = &ptr[len_smaller + 1];

Expand Down Expand Up @@ -1733,7 +1734,9 @@ gdv_int32 levenshtein(int64_t context, const char* in1, int32_t in1_len, const c
}

// Swaping v0 and v1
std::swap(v0, v1);
aux = v0;
v0 = v1;
v1 = aux;
}
// The results of v1 are now in v0, Levenshtein value is in v0[n]
int result = v0[len_smaller];
Expand Down

0 comments on commit 0b9f22b

Please sign in to comment.