diff options
author | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 21:52:15 +0000 |
---|---|---|
committer | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 21:52:15 +0000 |
commit | 82592da309a05caa5b1be3c83d4a32b739b3cfb9 (patch) | |
tree | 6aeefee9bc335698bf0c773f8ed0db6ff1aa2318 /o3d | |
parent | de627b7c490e9b83526a15e39e8c08f3ed2bd127 (diff) | |
download | chromium_src-82592da309a05caa5b1be3c83d4a32b739b3cfb9.zip chromium_src-82592da309a05caa5b1be3c83d4a32b739b3cfb9.tar.gz chromium_src-82592da309a05caa5b1be3c83d4a32b739b3cfb9.tar.bz2 |
Fx a GCC GYP release build problem. GCC (in release mode) wants to see a test for the same object being passed into the override on operator =. This causing a compiler warning when this got invoked via std::vector::push_back.
Review URL: http://codereview.chromium.org/257068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/core/cross/display_mode.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/o3d/core/cross/display_mode.h b/o3d/core/cross/display_mode.h index e663803..623f7a6 100644 --- a/o3d/core/cross/display_mode.h +++ b/o3d/core/cross/display_mode.h @@ -70,10 +70,12 @@ class DisplayMode { } } DisplayMode& operator=(const DisplayMode& mode) { - if (mode.valid()) { - Set(mode.width(), mode.height(), mode.refresh_rate(), mode.id()); - } else { - valid_ = false; + if (&mode != this) { + if (mode.valid()) { + Set(mode.width(), mode.height(), mode.refresh_rate(), mode.id()); + } else { + valid_ = false; + } } return *this; } |