Skip to content

Commit

Permalink
adjusted text or range-based version to in-place code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Apr 12, 2014
1 parent aebc51d commit fec98a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion from_goto_to_std-transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ vector<int> squareVec4(vector<int> v)
}
```

This time the `for` line already tells the reader that probably every element of `v` is used, but still only probably. One still has to look into the body of the for loop and look for `if`, `continue` or even `break` statements to really know that `result` is guaranteed to have the same size as `v` in the end.
This time the `for` line already tells the reader that probably every element of `v` is used, but still only probably. One still has to look into the body of the for loop and look for `if`, `continue` or even `break` statements to really know that every single elemnt in `v` will be iterated over the end. Also the header does not tell, what will happen to the elements.

Many people stop here, but we can do better in terms of readability ease.

Expand Down

0 comments on commit fec98a0

Please sign in to comment.