Skip to content

Commit d06e7f9

Browse files
author
Le Yao
committed
Format the c/c++ files and build files
Signed-off-by: Le Yao <[email protected]>
1 parent 86edeb5 commit d06e7f9

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cc_library(
3434
"@boringssl//:crypto",
3535
"@com_google_protobuf//:protobuf_lite",
3636
"@proxy_wasm_cpp_sdk//:api_lib",
37-
"@wasm_c_api//:wasmtime_lib",
3837
"@wamr//:wamr_lib",
38+
"@wasm_c_api//:wasmtime_lib",
3939
],
4040
)

src/wamr/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ using WasmExternVec =
4040
using WasmValtypeVec =
4141
common::CSmartType<wasm_valtype_vec_t, wasm_valtype_vec_new_empty, wasm_valtype_vec_delete>;
4242

43-
} // namespace WAMR (webassembly micro runtime)
43+
} // namespace wamr
4444

4545
} // namespace proxy_wasm

src/wamr/wamr.cc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ wasm_engine_t *engine() {
5353

5454
class Wamr : public WasmVm {
5555
public:
56-
Wamr () {}
56+
Wamr() {}
5757

5858
std::string_view runtime() override { return "webassembly micro runtime"; }
5959
std::string_view getPrecompiledSectionName() override { return ""; }
@@ -557,9 +557,8 @@ template <typename T> WasmFunctypePtr newWasmNewFuncType() {
557557
}
558558

559559
template <typename... Args>
560-
void Wamr::registerHostFunctionImpl(std::string_view module_name,
561-
std::string_view function_name,
562-
void (*function)(void *, Args...)) {
560+
void Wamr::registerHostFunctionImpl(std::string_view module_name, std::string_view function_name,
561+
void (*function)(void *, Args...)) {
563562
auto data =
564563
std::make_unique<HostFuncData>(std::string(module_name) + "." + std::string(function_name));
565564

@@ -591,9 +590,8 @@ void Wamr::registerHostFunctionImpl(std::string_view module_name,
591590
};
592591

593592
template <typename R, typename... Args>
594-
void Wamr::registerHostFunctionImpl(std::string_view module_name,
595-
std::string_view function_name,
596-
R (*function)(void *, Args...)) {
593+
void Wamr::registerHostFunctionImpl(std::string_view module_name, std::string_view function_name,
594+
R (*function)(void *, Args...)) {
597595
auto data =
598596
std::make_unique<HostFuncData>(std::string(module_name) + "." + std::string(function_name));
599597
WasmFunctypePtr type = newWasmNewFuncType<R, std::tuple<Args...>>();
@@ -627,7 +625,7 @@ void Wamr::registerHostFunctionImpl(std::string_view module_name,
627625

628626
template <typename... Args>
629627
void Wamr::getModuleFunctionImpl(std::string_view function_name,
630-
std::function<void(ContextBase *, Args...)> *function) {
628+
std::function<void(ContextBase *, Args...)> *function) {
631629

632630
auto it = module_functions_.find(std::string(function_name));
633631
if (it == module_functions_.end()) {
@@ -675,7 +673,7 @@ void Wamr::getModuleFunctionImpl(std::string_view function_name,
675673

676674
template <typename R, typename... Args>
677675
void Wamr::getModuleFunctionImpl(std::string_view function_name,
678-
std::function<R(ContextBase *, Args...)> *function) {
676+
std::function<R(ContextBase *, Args...)> *function) {
679677
auto it = module_functions_.find(std::string(function_name));
680678
if (it == module_functions_.end()) {
681679
*function = nullptr;

0 commit comments

Comments
 (0)