snippets
This commit is contained in:
parent
f626c98e12
commit
a886e85965
17
.vscode/c.code-snippets
vendored
17
.vscode/c.code-snippets
vendored
@ -9,16 +9,17 @@
|
||||
"body": ["#define swap(a, b) { typeof(a) temp = a; a = b; b = temp; }"],
|
||||
"description": "Define function swap two var with macro"
|
||||
},
|
||||
"Define function swap two int": {
|
||||
"prefix": "fn_swap",
|
||||
"Define var swapper": {
|
||||
"prefix": "fn_var_swapper",
|
||||
"body": [
|
||||
"void swap(int *a, int *b) {",
|
||||
" int temp = *a;",
|
||||
" *a = *b;",
|
||||
" *b = temp;",
|
||||
"}"
|
||||
"#define SWAPPER(type, name) \\",
|
||||
" void name(type *a, type *b) { \\",
|
||||
" type t = *a; \\",
|
||||
" *a = *b; \\",
|
||||
" *b = t; \\",
|
||||
" }"
|
||||
],
|
||||
"description": "Define function swap two int"
|
||||
"description": "Define var swapper"
|
||||
},
|
||||
"Define function put bool": {
|
||||
"prefix": "fn_putbool",
|
||||
|
Loading…
x
Reference in New Issue
Block a user