Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: ui/gfx/size_f.h

Issue 11028127: Implicit coversion operators from integer geometry types to floating point. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/size_f.h
diff --git a/ui/gfx/size_f.h b/ui/gfx/size_f.h
index f3ad7dbed9904aebb1aa9a1b52bba16623ef19ad..f9ac6bd890e5b5ab7ec4e7d4c880a5c7f4fef84b 100644
--- a/ui/gfx/size_f.h
+++ b/ui/gfx/size_f.h
@@ -30,6 +30,14 @@ class UI_EXPORT SizeF : public SizeBase<SizeF, float> {
std::string ToString() const;
};
+inline bool operator==(const SizeF& lhs, const SizeF& rhs) {
+ return lhs.width() == rhs.width() && lhs.height() == rhs.height();
+}
+
+inline bool operator!=(const SizeF& lhs, const SizeF& rhs) {
+ return !(lhs == rhs);
+}
+
#if !defined(COMPILER_MSVC)
extern template class SizeBase<SizeF, float>;
#endif
« no previous file with comments | « ui/gfx/size_base.h ('k') | ui/gfx/size_unittest.cc » ('j') | ui/ui_unittests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698