Bug 892839 - Fix buggy example code in Move.h. r=luke DONTBUILD
authorJustin Lebar <justin.lebar@gmail.com>
Mon, 15 Jul 2013 10:40:30 -0700
changeset 138456 79439df5bf5d7ba2a6a7b2b8ee991698a39c1df6
parent 138455 5e191a26d909f97239e4773529ba3ef8aaba6d8e
child 138460 e66abee160f370d412c141e45c906e545df1f413
push id24956
push userjlebar@mozilla.com
push dateMon, 15 Jul 2013 17:40:40 +0000
treeherderautoland@79439df5bf5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs892839
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 892839 - Fix buggy example code in Move.h. r=luke DONTBUILD
mfbt/Move.h
--- a/mfbt/Move.h
+++ b/mfbt/Move.h
@@ -96,21 +96,21 @@ namespace mozilla {
  *
  * This header file defines MoveRef and Move in the mozilla namespace.  It's up
  * to individual containers to annotate moves as such, by calling Move; and it's
  * up to individual types to define move constructors.
  *
  * One hint: if you're writing a move constructor where the type has members
  * that should be moved themselves, it's much nicer to write this:
  *
- *   C(MoveRef<C> c) : x(c->x), y(c->y) { }
+ *   C(MoveRef<C> c) : x(Move(c->x)), y(Move(c->y)) { }
  *
  * than the equivalent:
  *
- *   C(MoveRef<C> c) { new(&x) X(c->x); new(&y) Y(c->y); }
+ *   C(MoveRef<C> c) { new(&x) X(Move(c->x)); new(&y) Y(Move(c->y)); }
  *
  * especially since GNU C++ fails to notice that this does indeed initialize x
  * and y, which may matter if they're const.
  */
 template<typename T>
 class MoveRef
 {
     T* pointer;