Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: include/core/SkWriter32.h

Issue 147053003: fix (some) 64bit warnings -- size_t -> int (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkTypes.h ('k') | src/core/SkAAClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkWriter32.h
diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h
index 61d4a95f7e9888182b5ce48f58f3818e5a8bf5b3..6bb59c5dbc703f95f29f9645332747a519b32921 100644
--- a/include/core/SkWriter32.h
+++ b/include/core/SkWriter32.h
@@ -44,7 +44,7 @@ public:
SkASSERT(SkIsAlign4((uintptr_t)external));
SkASSERT(SkIsAlign4(externalBytes));
fExternal = (uint32_t*)external;
- fExternalLimit = externalBytes/4;
+ fExternalLimit = SkToInt(externalBytes/4);
fCount = 0;
fInternal.rewind();
}
@@ -64,7 +64,7 @@ public:
// size MUST be multiple of 4
uint32_t* reserve(size_t size) {
SkASSERT(SkAlign4(size) == size);
- const int count = size/4;
+ const int count = SkToInt(size/4);
uint32_t* p;
// Once we start writing to fInternal, we never write to fExternal again.
@@ -84,7 +84,7 @@ public:
// address is only valid for 1 int.
uint32_t* peek32(size_t offset) {
SkASSERT(SkAlign4(offset) == offset);
- const int count = offset/4;
+ const int count = SkToInt(offset/4);
SkASSERT(count < fCount);
if (count < this->externalCount()) {
@@ -220,7 +220,7 @@ public:
*/
void rewindToOffset(size_t offset) {
SkASSERT(SkAlign4(offset) == offset);
- const int count = offset/4;
+ const int count = SkToInt(offset/4);
if (count < this->externalCount()) {
fInternal.setCount(0);
} else {
« no previous file with comments | « include/core/SkTypes.h ('k') | src/core/SkAAClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698