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:
|
||||
> * using scoped_lock in arbitrary blocks, prefer tailed lisp brackets
|
||||
|
||||
```
|
||||
```cpp
|
||||
struct Data {
|
||||
int x{ 0 }, y{ 0 };
|
||||
};
|
||||
void MyFunction(Data const &data) { // K&R here
|
||||
DoAsynchronousThings();
|
||||
{ scoped_lock lock{ myMutex };
|
||||
{ std::scoped_lock lock{ myMutex };
|
||||
myVariable++;
|
||||
} // not quite lisp, lisp with a tail
|
||||
DoMoreAsynchronousThings();
|
||||
|
|
|
|||
Loading…
Reference in a new issue