Skip to content

Commit 2a5e733

Browse files
authored
Merge pull request Tencent#1364 from jcourtat/fixfaq
faq: fix document insertion example
2 parents c0ca05f + 68349ed commit 2a5e733

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144

145145
Simple yet most efficient way to achieve that is to modify the `address` definition above to initialize it with allocator of the `person` document, then we just add the root member of the value:
146146
~~~~~~~~~~cpp
147-
Document address(person.GetAllocator());
147+
Document address(&person.GetAllocator());
148148
...
149149
person["person"].AddMember("address", address["address"], person.GetAllocator());
150150
~~~~~~~~~~

doc/faq.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
一个简单有效的方法就是修改上述 `address` 变量的定义,让其使用 `person` 的 allocator 初始化,然后将其添加到根节点。
146146

147147
~~~~~~~~~~cpp
148-
Documnet address(person.GetAllocator());
148+
Documnet address(&person.GetAllocator());
149149
...
150150
person["person"].AddMember("address", address["address"], person.GetAllocator());
151151
~~~~~~~~~~

0 commit comments

Comments
 (0)