Skip to content

Commit

Permalink
fix: refine codes
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn committed Nov 7, 2024
1 parent a8c0948 commit c256c2f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"request": "launch",
"program": "${workspaceFolder}/out/linux/x64/tests/standalone/ten_runtime_smoke_test",
"args": [
"--gtest_filter=AudioFrameTest.FromJson"
"--gtest_filter=StandaloneTest.BasicC"
],
"cwd": "${workspaceFolder}/out/linux/x64/tests/standalone/",
"env": {
Expand Down
2 changes: 1 addition & 1 deletion core/src/ten_runtime/app/predefined_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ bool ten_app_get_predefined_graphs_from_property(ten_app_t *self) {
result = false;
goto done;
}
ten_string_init_from_c_str(
ten_string_set_from_c_str(
&predefined_graph_info->name,
ten_value_peek_raw_str(predefined_graph_info_name_value),
strlen(ten_value_peek_raw_str(predefined_graph_info_name_value)));
Expand Down
4 changes: 2 additions & 2 deletions core/src/ten_runtime/app/ten_env/on_xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ void ten_app_on_configure_done(ten_env_t *ten_env) {
ten_app_adjust_and_validate_property_on_configure_done(self);

if (ten_string_is_empty(&self->uri)) {
ten_string_init_from_c_str(&self->uri, TEN_STR_LOCALHOST,
strlen(TEN_STR_LOCALHOST));
ten_string_set_from_c_str(&self->uri, TEN_STR_LOCALHOST,
strlen(TEN_STR_LOCALHOST));
}

ten_addon_load_all_from_app_base_dir(self, &err);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void ten_msg_conversion_per_property_rule_from_original_from_json(
TEN_ASSERT(json, "Invalid argument.");

ten_msg_conversion_per_property_rule_from_original_init(self);
ten_string_init_formatted(&self->original_path,
ten_json_peek_string_value(ten_json_object_peek(
json, TEN_STR_ORIGINAL_PATH)));
ten_string_set_formatted(&self->original_path,
ten_json_peek_string_value(ten_json_object_peek(
json, TEN_STR_ORIGINAL_PATH)));
}

bool ten_msg_conversion_per_property_rule_from_original_to_json(
Expand All @@ -91,9 +91,9 @@ bool ten_msg_conversion_per_property_rule_from_original_from_value(
TEN_ASSERT(value, "Invalid argument.");

ten_msg_conversion_per_property_rule_from_original_init(self);
ten_string_init_formatted(&self->original_path,
ten_value_peek_raw_str(ten_value_object_peek(
value, TEN_STR_ORIGINAL_PATH)));
ten_string_set_formatted(&self->original_path,
ten_value_peek_raw_str(ten_value_object_peek(
value, TEN_STR_ORIGINAL_PATH)));

return true;
}
Expand Down

0 comments on commit c256c2f

Please sign in to comment.