mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Simplified further
This commit is contained in:
parent
d99f707392
commit
97544a0b81
|
@ -819,8 +819,8 @@ for (int i = 0; i < 1000000; ++i) {
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>It may be more efficient to declare such a variable
|
<p>It may be more efficient to declare such variables
|
||||||
(which is used in a loop) outside that loop:</p>
|
outside the loop, as in:</p>
|
||||||
|
|
||||||
<pre>Foo f; // My ctor and dtor get called once each.
|
<pre>Foo f; // My ctor and dtor get called once each.
|
||||||
for (int i = 0; i < 1000000; ++i) {
|
for (int i = 0; i < 1000000; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user