Skip to content

Commit ff9cba2

Browse files
authored
Doc fix verifier example code for cpp (#8664)
1 parent 1759061 commit ff9cba2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/source/languages/cpp.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ Each root type will have a verification function generated for it,
419419
e.g. for `Monster`, you can call:
420420

421421
```cpp
422-
bool ok = VerifyMonsterBuffer(Verifier(buf, len));
422+
Verifier verifier(buf, len);
423+
bool ok = VerifyMonsterBuffer(verifier);
423424
```
424425
425426
if `ok` is true, the buffer is safe to read.

0 commit comments

Comments
 (0)