projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdc91a7
)
Make SkIsPow2 templated
author
bsalomon
<bsalomon@google.com>
Fri, 31 Jul 2015 15:22:17 +0000
(08:22 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Fri, 31 Jul 2015 15:22:17 +0000
(08:22 -0700)
Review URL: https://codereview.chromium.org/
1271533002
include/core/SkMath.h
patch
|
blob
|
history
diff --git
a/include/core/SkMath.h
b/include/core/SkMath.h
index
d9517dd
..
d1d0e36
100644
(file)
--- a/
include/core/SkMath.h
+++ b/
include/core/SkMath.h
@@
-150,7
+150,7
@@
static inline int SkNextLog2(uint32_t value) {
* Returns true if value is a power of 2. Does not explicitly check for
* value <= 0.
*/
-
static inline bool SkIsPow2(int
value) {
+
template <typename T> inline bool SkIsPow2(T
value) {
return (value & (value - 1)) == 0;
}