diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-12-13 10:55:51 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-12-13 23:36:11 -0300 |
commit | 77135447e09903b45d1482da45869946212f7904 (patch) | |
tree | 53b17c11d4bfbe8031842cfb65ae5c53c5eb41d7 /test/functional/legacy/nested_function_spec.lua | |
parent | 64a32d55c59188f1e922ca438fdb2d65caa06665 (diff) | |
download | rneovim-77135447e09903b45d1482da45869946212f7904.tar.gz rneovim-77135447e09903b45d1482da45869946212f7904.tar.bz2 rneovim-77135447e09903b45d1482da45869946212f7904.zip |
Reduce indentation level by early returning or continuing loop
Replace code like this
```c
func() {
if (cond) {
...
...
...
}
return ret;
}
```
```c
for (...) {
if (cond) {
...
...
...
}
}
```
with
```c
func() {
if (!cond) {
return ret;
}
...
...
...
}
```
```c
for (...) {
if (!cond) {
continue;
}
...
...
...
}
```
Diffstat (limited to 'test/functional/legacy/nested_function_spec.lua')
0 files changed, 0 insertions, 0 deletions