fix: specified cpp for code block in README.md
This commit is contained in:
parent
454abfce1e
commit
bac1ace9bf
|
|
@ -25,13 +25,13 @@ Either `git clone --recursive` or remember to `git submodule update --init --rec
|
||||||
> (1) Bracket exceptions:
|
> (1) Bracket exceptions:
|
||||||
> * using scoped_lock in arbitrary blocks, prefer tailed lisp brackets
|
> * using scoped_lock in arbitrary blocks, prefer tailed lisp brackets
|
||||||
|
|
||||||
```
|
```cpp
|
||||||
struct Data {
|
struct Data {
|
||||||
int x{ 0 }, y{ 0 };
|
int x{ 0 }, y{ 0 };
|
||||||
};
|
};
|
||||||
void MyFunction(Data const &data) { // K&R here
|
void MyFunction(Data const &data) { // K&R here
|
||||||
DoAsynchronousThings();
|
DoAsynchronousThings();
|
||||||
{ scoped_lock lock{ myMutex };
|
{ std::scoped_lock lock{ myMutex };
|
||||||
myVariable++;
|
myVariable++;
|
||||||
} // not quite lisp, lisp with a tail
|
} // not quite lisp, lisp with a tail
|
||||||
DoMoreAsynchronousThings();
|
DoMoreAsynchronousThings();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue