Skip to content

Commit e8675ea

Browse files
committed
unify dummy function names
1 parent 19c0e77 commit e8675ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CppCoreGuidelines.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,13 +2315,13 @@ When copying is cheap, nothing beats the simplicity and safety of copying, and f
23152315

23162316
##### Example
23172317

2318-
void fct(const string& s); // OK: pass by reference to const; always cheap
2318+
void f(const string& s); // OK: pass by reference to const; always cheap
23192319

2320-
void fct2(string s); // bad: potentially expensive
2320+
void f2(string s); // bad: potentially expensive
23212321

2322-
void fct(int x); // OK: Unbeatable
2322+
void f3(int x); // OK: Unbeatable
23232323

2324-
void fct2(const int& x); // bad: overhead on access in fct2()
2324+
void f4(const int& x); // bad: overhead on access in f4()
23252325

23262326
For advanced uses (only), where you really need to optimize for rvalues passed to "input-only" parameters:
23272327

@@ -7274,7 +7274,7 @@ The members of a scoped object are themselves scoped and the scoped object's con
72747274

72757275
The following example is inefficient (because it has unnecessary allocation and deallocation), vulnerable to exception throws and returns in the "¦ part (leading to leaks), and verbose:
72767276

7277-
void some_function(int n)
7277+
void f(int n)
72787278
{
72797279
auto p = new Gadget{n};
72807280
// ...
@@ -7283,7 +7283,7 @@ The following example is inefficient (because it has unnecessary allocation and
72837283

72847284
Instead, use a local variable:
72857285

7286-
void some_function(int n)
7286+
void f(int n)
72877287
{
72887288
Gadget g{n};
72897289
// ...

0 commit comments

Comments
 (0)