aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix.cpp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-08-20 07:57:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-20 07:57:52 -0700
commit99fe82260633fcf5d92cca38d12ef0937ecca61c (patch)
tree258dedccd2b908de58f6b1ae7c67dbfbe7208866 /src/core/SkMatrix.cpp
parent915881fe743f9a789037695f543bc6ea189cd0cb (diff)
Use static_assert instead of SK_COMPILE_ASSERT.
Now that static_assert is allowed, there is no need to use a non- standard compile time assertion Review URL: https://codereview.chromium.org/1306443004
Diffstat (limited to 'src/core/SkMatrix.cpp')
-rw-r--r--src/core/SkMatrix.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 31ff4b15e3..e030560626 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -1592,13 +1592,13 @@ struct PODMatrix {
const SkMatrix& asSkMatrix() const { return *reinterpret_cast<const SkMatrix*>(this); }
};
-SK_COMPILE_ASSERT(sizeof(PODMatrix) == sizeof(SkMatrix), PODMatrixSizeMismatch);
+static_assert(sizeof(PODMatrix) == sizeof(SkMatrix), "PODMatrixSizeMismatch");
} // namespace
const SkMatrix& SkMatrix::I() {
- SK_COMPILE_ASSERT(offsetof(SkMatrix, fMat) == offsetof(PODMatrix, matrix), BadfMat);
- SK_COMPILE_ASSERT(offsetof(SkMatrix, fTypeMask) == offsetof(PODMatrix, typemask), BadfTypeMask);
+ static_assert(offsetof(SkMatrix, fMat) == offsetof(PODMatrix, matrix), "BadfMat");
+ static_assert(offsetof(SkMatrix, fTypeMask) == offsetof(PODMatrix, typemask), "BadfTypeMask");
static const PODMatrix identity = { {SK_Scalar1, 0, 0,
0, SK_Scalar1, 0,
@@ -1609,8 +1609,8 @@ const SkMatrix& SkMatrix::I() {
}
const SkMatrix& SkMatrix::InvalidMatrix() {
- SK_COMPILE_ASSERT(offsetof(SkMatrix, fMat) == offsetof(PODMatrix, matrix), BadfMat);
- SK_COMPILE_ASSERT(offsetof(SkMatrix, fTypeMask) == offsetof(PODMatrix, typemask), BadfTypeMask);
+ static_assert(offsetof(SkMatrix, fMat) == offsetof(PODMatrix, matrix), "BadfMat");
+ static_assert(offsetof(SkMatrix, fTypeMask) == offsetof(PODMatrix, typemask), "BadfTypeMask");
static const PODMatrix invalid =
{ {SK_ScalarMax, SK_ScalarMax, SK_ScalarMax,