summaryrefslogtreecommitdiffstats
path: root/base/file_descriptor_posix.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-19 14:50:21 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-19 14:50:21 +0000
commitaf58f48608e9fcc8ad4b6baf3116bb7cfadbd6fd (patch)
tree46ed0c923f5b59a4c80a2a9ddf9cd3be2619708d /base/file_descriptor_posix.h
parent5f43f77ffa25c39ec730f11ee50204a870502568 (diff)
downloadchromium_src-af58f48608e9fcc8ad4b6baf3116bb7cfadbd6fd.zip
chromium_src-af58f48608e9fcc8ad4b6baf3116bb7cfadbd6fd.tar.gz
chromium_src-af58f48608e9fcc8ad4b6baf3116bb7cfadbd6fd.tar.bz2
Add an operator!= to base::FileDescriptor.
(It already has an operator==.) R=brettw@chromium.org Review URL: https://codereview.chromium.org/203303007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_descriptor_posix.h')
-rw-r--r--base/file_descriptor_posix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/file_descriptor_posix.h b/base/file_descriptor_posix.h
index 093dd2f..c730be6 100644
--- a/base/file_descriptor_posix.h
+++ b/base/file_descriptor_posix.h
@@ -29,6 +29,10 @@ struct FileDescriptor {
return (fd == other.fd && auto_close == other.auto_close);
}
+ bool operator!=(const FileDescriptor& other) const {
+ return !operator==(other);
+ }
+
// A comparison operator so that we can use these as keys in a std::map.
bool operator<(const FileDescriptor& other) const {
return other.fd < fd;