9fc53624a0
Bug:798066 Change-Id: Iac324ac5a32fae241a528751c84279ce60ac4baf Reviewed-on: https://skia-review.googlesource.com/90544 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
18 lines
384 B
C
18 lines
384 B
C
/*
|
|
* Copyright 2018 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkPedanticMath_DEFINED
|
|
#define SkPedanticMath_DEFINED
|
|
|
|
// To avoid UBSAN complaints about 2's compliment overflows
|
|
//
|
|
static inline int32_t SkSub32(int32_t a, int32_t b) {
|
|
return (int32_t)((uint32_t)a - (uint32_t)b);
|
|
}
|
|
|
|
#endif
|