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

Side by Side Diff: ui/gfx/point_base.h

Issue 10203004: no virtual destructor for point/size/rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_POINT_BASE_H_ 5 #ifndef UI_GFX_POINT_BASE_H_
6 #define UI_GFX_POINT_BASE_H_ 6 #define UI_GFX_POINT_BASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // the x-value closer to the origin is considered less than the 73 // the x-value closer to the origin is considered less than the
74 // other. 74 // other.
75 // This comparison is required to use Point in sets, or sorted 75 // This comparison is required to use Point in sets, or sorted
76 // vectors. 76 // vectors.
77 bool operator<(const Class& rhs) const { 77 bool operator<(const Class& rhs) const {
78 return (y_ == rhs.y_) ? (x_ < rhs.x_) : (y_ < rhs.y_); 78 return (y_ == rhs.y_) ? (x_ < rhs.x_) : (y_ < rhs.y_);
79 } 79 }
80 80
81 protected: 81 protected:
82 PointBase(Type x, Type y) : x_(x), y_(y) {} 82 PointBase(Type x, Type y) : x_(x), y_(y) {}
83 virtual ~PointBase() {} 83 ~PointBase() {}
84 84
85 private: 85 private:
86 Type x_; 86 Type x_;
87 Type y_; 87 Type y_;
88 }; 88 };
89 89
90 } // namespace gfx 90 } // namespace gfx
91 91
92 #endif // UI_GFX_POINT_BASE_H_ 92 #endif // UI_GFX_POINT_BASE_H_
OLDNEW
« ui/gfx/point.h ('K') | « ui/gfx/point.h ('k') | ui/gfx/point_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698