Add const to two methods.
Review URL: http://codereview.chromium.org/2867009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50111 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -52,13 +52,13 @@ class Point {
|
||||
y_ += delta_y;
|
||||
}
|
||||
|
||||
Point Add(const Point& other) {
|
||||
Point Add(const Point& other) const{
|
||||
Point copy = *this;
|
||||
copy.Offset(other.x_, other.y_);
|
||||
return copy;
|
||||
}
|
||||
|
||||
Point Subtract(const Point& other) {
|
||||
Point Subtract(const Point& other) const {
|
||||
Point copy = *this;
|
||||
copy.Offset(-other.x_, -other.y_);
|
||||
return copy;
|
||||
|
Reference in New Issue
Block a user