aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkThreadUtils_win.cpp2
-rw-r--r--src/utils/win/SkIStream.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/SkThreadUtils_win.cpp b/src/utils/SkThreadUtils_win.cpp
index 208ffded1b..a064d3b6b3 100644
--- a/src/utils/SkThreadUtils_win.cpp
+++ b/src/utils/SkThreadUtils_win.cpp
@@ -108,7 +108,7 @@ static unsigned int num_bits_set(DWORD_PTR mask) {
static unsigned int nth_set_bit(unsigned int n, DWORD_PTR mask) {
n %= num_bits_set(mask);
for (unsigned int setBitsSeen = 0, currentBit = 0; true; ++currentBit) {
- if (mask & (1 << currentBit)) {
+ if (mask & (static_cast<DWORD_PTR>(1) << currentBit)) {
++setBitsSeen;
if (setBitsSeen > n) {
return currentBit;
diff --git a/src/utils/win/SkIStream.cpp b/src/utils/win/SkIStream.cpp
index 1d00611f79..7880fa0790 100644
--- a/src/utils/win/SkIStream.cpp
+++ b/src/utils/win/SkIStream.cpp
@@ -128,7 +128,7 @@ HRESULT SkIStream::CreateFromSkStream(SkStream* stream
// ISequentialStream Interface
HRESULT STDMETHODCALLTYPE SkIStream::Read(void* pv, ULONG cb, ULONG* pcbRead) {
- *pcbRead = this->fSkStream->read(pv, cb);
+ *pcbRead = static_cast<ULONG>(this->fSkStream->read(pv, cb));
this->fLocation.QuadPart += *pcbRead;
return (*pcbRead == cb) ? S_OK : S_FALSE;
}