summaryrefslogtreecommitdiffstats
path: root/media/mp4
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-15 20:36:05 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-15 20:36:05 +0000
commite95d6ed72b41e370140f3103de8b1a3b1eefbfec (patch)
tree49cfef0fc09463dbfc13379cb5b277a07607dadd /media/mp4
parente1ef4c65ae2a2e75ddfc604f827e77480c36c7fb (diff)
downloadchromium_src-e95d6ed72b41e370140f3103de8b1a3b1eefbfec.zip
chromium_src-e95d6ed72b41e370140f3103de8b1a3b1eefbfec.tar.gz
chromium_src-e95d6ed72b41e370140f3103de8b1a3b1eefbfec.tar.bz2
Fix move.h's to use a concrete RValue carrier object rather than hacking a RValue&.
For move semantics, we need to create a private "RValue" type that is used to create move constructors and move operators. Previously, we emulated Boost's idea of making the RValue type a subclass of the move-only type that doesn't add any new member fields. We then just reinterpret_cast "this" into a RValue& depending on the fact that RValue is just a type pun for the move-only type. This ends up being undefined behavior though (C++98 5.2.10.7). This change makes use a concrete RValue class that contains a pointer to the move-only type. With -O2 on clang version 3.2 (trunk 163674), this yields identical assembly code to the previous implementation. With -O0, we generate 2 more instructions to allocate and initialize the temporary RValue struct's object field when calling Pass(). This should be acceptable. The snowman says so ☃. BUG=155436 Review URL: https://chromiumcodereview.appspot.com/11078014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mp4')
-rw-r--r--media/mp4/mp4_stream_parser_unittest.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/media/mp4/mp4_stream_parser_unittest.cc b/media/mp4/mp4_stream_parser_unittest.cc
index 6c577ad..6d7221a 100644
--- a/media/mp4/mp4_stream_parser_unittest.cc
+++ b/media/mp4/mp4_stream_parser_unittest.cc
@@ -9,7 +9,6 @@
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
-#include "base/move.h"
#include "base/time.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/decoder_buffer.h"