This commit is contained in:
2025-03-14 18:14:53 +08:00
parent a886e85965
commit f9d6b0d528
4 changed files with 7 additions and 10 deletions
+3 -3
View File
@@ -10,10 +10,10 @@
"description": "Define function swap two var with macro"
},
"Define var swapper": {
"prefix": "fn_var_swapper",
"prefix": "fn_define_swapper",
"body": [
"#define SWAPPER(type, name) \\",
" void name(type *a, type *b) { \\",
"#define DEFINE_SWAPPER(type) \\",
" void swap_##type(type *a, type *b) { \\",
" type t = *a; \\",
" *a = *b; \\",
" *b = t; \\",