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