Skip to content

Commit dd13895

Browse files
pass an std::string to string_view instead of pointer and size
1 parent 6c61999 commit dd13895

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

libs/libvtrutil/src/vtr_expr_eval.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,9 @@ static void get_formula_object(const char* ch, int& ichar, const t_formula_data&
315315
}
316316

317317
} else if (!is_breakpoint) {
318-
//A number
318+
// A number
319319
fobj->type = E_FML_NUMBER;
320-
fobj->data.num = mydata.get_var_value(
321-
std::string_view(
322-
var_name.data(),
323-
var_name.size()));
320+
fobj->data.num = mydata.get_var_value(var_name);
324321
} else if (is_variable(var_name)) {
325322
fobj->type = E_FML_VARIABLE;
326323
if (same_string(var_name, "temp_count"))

0 commit comments

Comments
 (0)