commit | dd47202dba35d13322d1a08d30d7f2bc52ef58e5 | [log] [tgz] |
---|---|---|
author | Wen Fan <[email protected]> | Fri Mar 12 01:31:09 2021 |
committer | Chromium LUCI CQ <[email protected]> | Fri Mar 12 01:31:09 2021 |
tree | d89e63c849c8e4f87a41cc43aec5140d149b289a | |
parent | 53d97b83e4bcf93019d2cb3c71e06909ed43c24a [diff] [blame] |
Fix an example in the callback documentation Add return value to make the demo code more accurate Bug: 1151318 Change-Id: Ia300589a5d0a722c9e3d4bbe3231ea69793df24b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752668 Reviewed-by: danakj <[email protected]> Commit-Queue: danakj <[email protected]> Cr-Commit-Position: refs/heads/master@{#862243}
diff --git a/docs/callback.md b/docs/callback.md index 1b51645..c97c86d 100644 --- a/docs/callback.md +++ b/docs/callback.md
@@ -608,7 +608,10 @@ doesn't expect a return value. ```cpp -int DoSomething(int arg) { cout << arg << endl; } +int DoSomething(int arg) { + cout << arg << endl; + return arg; +} base::RepeatingCallback<void(int)> cb = base::BindRepeating(IgnoreResult(&DoSomething)); ```