From abeab68729cacfc517427d8f5ec0f119de0863b4 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 24 Oct 2018 08:35:10 +0100 Subject: [PATCH] NonCopyable: Fix edit. --- platform/NonCopyable.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/NonCopyable.h b/platform/NonCopyable.h index 104b7fd0c8..00b78a353a 100644 --- a/platform/NonCopyable.h +++ b/platform/NonCopyable.h @@ -82,11 +82,11 @@ namespace mbed { * There is a subtle bug in this code, the function get_connection returns a * reference to a Connection which is captured by value instead of reference. * - * When the reference get_connection returns is copied into connection, the - * vtable and others members defined in Connection are copied, but members defined - * in SerialConnection are left apart. This can cause severe crashes or bugs if - * the virtual functions captured use members not present in the base - * declaration. + * When `get_connection` returns a reference to serial_connection it is copied into + * the local variable connection. The vtable and others members defined in Connection + * are copied, but members defined in SerialConnection are left apart. This can cause + * severe crashes or bugs if the virtual functions captured use members not present + * in the base declaration. * * To solve that problem, the copy constructor and assignment operator have to * be declared (but don't need to be defined) in the private section of the