Skip to content

Commit b0f6f30

Browse files
committed
book: fmt
1 parent 309f1f3 commit b0f6f30

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

book/en-us/05-pointers.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ And return the `std::shared_ptr` pointer of this object type. For example:
3636
```cpp
3737
#include <iostream>
3838
#include <memory>
39-
void foo(std::shared_ptr<int> i)
40-
{
39+
void foo(std::shared_ptr<int> i) {
4140
(*i)++;
4241
}
43-
int main()
44-
{
42+
int main() {
4543
// auto pointer = new int(10); // illegal, no direct assignment
4644
// Constructed a std::shared_ptr
4745
auto pointer = std::make_shared<int>(10);

book/zh-cn/05-pointers.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ order: 5
3838
```cpp
3939
#include <iostream>
4040
#include <memory>
41-
void foo(std::shared_ptr<int> i)
42-
{
41+
void foo(std::shared_ptr<int> i) {
4342
(*i)++;
4443
}
45-
int main()
46-
{
44+
int main() {
4745
// auto pointer = new int(10); // illegal, no direct assignment
4846
// Constructed a std::shared_ptr
4947
auto pointer = std::make_shared<int>(10);

0 commit comments

Comments
 (0)