@@ -15,10 +15,8 @@ struct FunctionLocalVariable
1515 LocalVarInfo info;
1616 bool is_extern;
1717
18- FunctionLocalVariable (LocalVarInfo info, bool is_extern)
18+ FunctionLocalVariable (LocalVarInfo info, bool is_extern) : info(std::move(info)), is_extern(std::move(is_extern))
1919 {
20- this ->info = info;
21- this ->is_extern = is_extern;
2220 }
2321};
2422
@@ -29,9 +27,8 @@ struct Function
2927 std::vector<LocalVarInfo> local_variables;
3028
3129 Function (FuncInfo info, std::vector<FunctionLocalVariable> arguments)
30+ : info(std::move(info)), arguments(std::move(arguments))
3231 {
33- this ->info = info;
34- this ->arguments = arguments;
3532 }
3633};
3734
@@ -41,9 +38,8 @@ struct EventHandler
4138 std::string function_name;
4239
4340 EventHandler (std::string event_name, std::string function_name)
41+ : event_name(std::move(event_name)), function_name(std::move(function_name))
4442 {
45- this ->event_name = event_name;
46- this ->function_name = function_name;
4743 }
4844};
4945
@@ -54,10 +50,8 @@ struct Define
5450 uintptr_t value;
5551
5652 Define (std::string name, uint32_t type, uintptr_t value)
53+ : name(std::move(name)), type(std::move(type)), value(std::move(value))
5754 {
58- this ->name = name;
59- this ->type = type;
60- this ->value = value;
6155 }
6256};
6357
0 commit comments