diff --git a/_posts/2019-12-19-totw-108.md b/_posts/2019-12-19-totw-108.md index 044632a0..eb03bdf0 100644 --- a/_posts/2019-12-19-totw-108.md +++ b/_posts/2019-12-19-totw-108.md @@ -25,7 +25,7 @@ Using `std::bind()` correctly is hard. Let's look at a few examples. Does this code look good to you? ```c++ -void DoStuffAsync(std::function; cb); +void DoStuffAsync(std::function cb); class MyClass { void Start() { @@ -124,7 +124,7 @@ void DoStuffAsync(F cb) { class MyClass { void Start() { - DoStuffAsync(std::bind(&yClass::OnDone, this)); + DoStuffAsync(std::bind(&MyClass::OnDone, this)); } void OnDone(); };