Skip to content

Commit abeab68

Browse files
authored
NonCopyable: Fix edit.
1 parent acaf968 commit abeab68

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

platform/NonCopyable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ namespace mbed {
8282
* There is a subtle bug in this code, the function get_connection returns a
8383
* reference to a Connection which is captured by value instead of reference.
8484
*
85-
* When the reference get_connection returns is copied into connection, the
86-
* vtable and others members defined in Connection are copied, but members defined
87-
* in SerialConnection are left apart. This can cause severe crashes or bugs if
88-
* the virtual functions captured use members not present in the base
89-
* declaration.
85+
* When `get_connection` returns a reference to serial_connection it is copied into
86+
* the local variable connection. The vtable and others members defined in Connection
87+
* are copied, but members defined in SerialConnection are left apart. This can cause
88+
* severe crashes or bugs if the virtual functions captured use members not present
89+
* in the base declaration.
9090
*
9191
* To solve that problem, the copy constructor and assignment operator have to
9292
* be declared (but don't need to be defined) in the private section of the

0 commit comments

Comments
 (0)