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

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

Issue 10203004: no virtual destructor for point/size/rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comment 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
« no previous file with comments | « ui/gfx/size.h ('k') | ui/gfx/size_f.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SIZE_BASE_H_ 5 #ifndef UI_GFX_SIZE_BASE_H_
6 #define UI_GFX_SIZE_BASE_H_ 6 #define UI_GFX_SIZE_BASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return !(*this == s); 52 return !(*this == s);
53 } 53 }
54 54
55 bool IsEmpty() const { 55 bool IsEmpty() const {
56 // Size doesn't allow negative dimensions, so testing for 0 is enough. 56 // Size doesn't allow negative dimensions, so testing for 0 is enough.
57 return (width_ == 0) || (height_ == 0); 57 return (width_ == 0) || (height_ == 0);
58 } 58 }
59 59
60 protected: 60 protected:
61 SizeBase(Type width, Type height); 61 SizeBase(Type width, Type height);
62 virtual ~SizeBase(); 62 // Destructor is intentionally made non virtual and protected.
63 // Do not make this public.
64 ~SizeBase();
63 65
64 private: 66 private:
65 Type width_; 67 Type width_;
66 Type height_; 68 Type height_;
67 }; 69 };
68 70
69 } // namespace gfx 71 } // namespace gfx
70 72
71 #endif // UI_GFX_SIZE_BASE_H_ 73 #endif // UI_GFX_SIZE_BASE_H_
OLDNEW
« no previous file with comments | « ui/gfx/size.h ('k') | ui/gfx/size_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698