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

Unified Diff: include/core/SkReader32.h

Issue 247753003: fix size_t/int warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: revert name-change in swap32 Created 6 years, 8 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/SkReadBuffer.h ('k') | src/core/SkReadBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkReader32.h
diff --git a/include/core/SkReader32.h b/include/core/SkReader32.h
index 40ae12ce23638c05755f5742e0ecaf63f8b22401..7e8038d0ae3a7913cf3c5ee036b866b7720e0963 100644
--- a/include/core/SkReader32.h
+++ b/include/core/SkReader32.h
@@ -33,14 +33,14 @@ public:
fStop = (const char*)data + size;
}
- uint32_t size() const { return SkToU32(fStop - fBase); }
- uint32_t offset() const { return SkToU32(fCurr - fBase); }
+ size_t size() const { return fStop - fBase; }
+ size_t offset() const { return fCurr - fBase; }
bool eof() const { return fCurr >= fStop; }
const void* base() const { return fBase; }
const void* peek() const { return fCurr; }
- uint32_t available() const { return SkToU32(fStop - fCurr); }
- bool isAvailable(uint32_t size) const { return fCurr + size <= fStop; }
+ size_t available() const { return fStop - fCurr; }
+ bool isAvailable(size_t size) const { return fCurr + size <= fStop; }
void rewind() { fCurr = fBase; }
« no previous file with comments | « include/core/SkReadBuffer.h ('k') | src/core/SkReadBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698