diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:09:54 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:09:54 +0000 |
commit | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (patch) | |
tree | d8b4815d15946c32ee9d254e932411e93be942bb /include/core/SkSize.h | |
parent | 2abed834789bb64c7da740df4c47efc142b7311a (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkSize.h')
-rw-r--r-- | include/core/SkSize.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/core/SkSize.h b/include/core/SkSize.h index 12dbeae424..808583f3e8 100644 --- a/include/core/SkSize.h +++ b/include/core/SkSize.h @@ -36,15 +36,15 @@ template <typename T> struct SkTSize { bool isEmpty() const { return fWidth <= 0 || fHeight <= 0; } - + /** Set the width and height to 0 */ void setEmpty() { fWidth = fHeight = 0; } - - T width() const { return fWidth; } - T height() const { return fHeight; } - + + T width() const { return fWidth; } + T height() const { return fHeight; } + /** If width or height is < 0, it is set to 0 */ void clampNegToZero() { if (fWidth < 0) { @@ -54,7 +54,7 @@ template <typename T> struct SkTSize { fHeight = 0; } } - + bool equals(T w, T h) const { return fWidth == w && fHeight == h; } @@ -83,8 +83,8 @@ struct SkSize : public SkTSize<SkScalar> { s.fHeight = h; return s; } - - + + SkSize& operator=(const SkISize& src) { this->set(SkIntToScalar(src.fWidth), SkIntToScalar(src.fHeight)); return *this; |