Skip to content

Commit 12bdb63

Browse files
committed
fix parens
1 parent 6a8728a commit 12bdb63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CppCoreGuidelines.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11527,8 +11527,8 @@ Thread creation is expensive.
1152711527

1152811528
void master(istream& is)
1152911529
{
11530-
for (Message m; is>>m; )
11531-
run_list.push_back(new thread(worker,m);}
11530+
for (Message m; is >> m; )
11531+
run_list.push_back(new thread(worker, m));
1153211532
}
1153311533

1153411534
This spawns a `thread` per message, and the `run_list` is presumably managed to destroy those tasks once they are finished.
@@ -11913,9 +11913,9 @@ Double-checked locking is easy to mess up.
1191311913

1191411914
atomic<bool> x_init;
1191511915

11916-
if (!x_init.load(memory_order_acquire) {
11916+
if (!x_init.load(memory_order_acquire)) {
1191711917
lock_guard<mutex> lck(x_mutex);
11918-
if (!x_init.load(memory_order_relaxed) {
11918+
if (!x_init.load(memory_order_relaxed)) {
1191911919
// ... initialize x ...
1192011920
x_init.store(true, memory_order_release);
1192111921
}

0 commit comments

Comments
 (0)