1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[js] minor optimisation. add_bytes_to_string, because length is known.

This commit is contained in:
Witold Filipczyk 2022-06-19 13:19:07 +02:00
parent f72f2ae60a
commit 67670c28a0
2 changed files with 2 additions and 2 deletions

View File

@ -1043,7 +1043,7 @@ js_document_replace(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons
struct string f_data;
if (init_string(&f_data)) {
add_to_string(&f_data,f->data);
add_bytes_to_string(&f_data, f->data, f->length);
struct string nu_str;
if (init_string(&nu_str)) {

View File

@ -1429,7 +1429,7 @@ document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp)
struct string f_data;
if (init_string(&f_data)) {
add_to_string(&f_data,f->data);
add_bytes_to_string(&f_data, f->data, f->length);
struct string nu_str;
if (init_string(&nu_str)) {