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

Unified Diff: include/core/SkTemplates.h

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 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 | « no previous file | include/core/SkWriter32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTemplates.h
===================================================================
--- include/core/SkTemplates.h (revision 11758)
+++ include/core/SkTemplates.h (working copy)
@@ -241,7 +241,7 @@
/** Allocate count number of T elements
*/
- SkAutoSTArray(size_t count) {
+ SkAutoSTArray(int count) {
fArray = NULL;
fCount = 0;
this->reset(count);
@@ -252,7 +252,7 @@
}
/** Destroys previous objects in the array and default constructs count number of objects */
- void reset(size_t count) {
+ void reset(int count) {
T* start = fArray;
T* iter = start + fCount;
while (iter > start) {
@@ -286,7 +286,7 @@
/** Return the number of T elements in the array
*/
- size_t count() const { return fCount; }
+ int count() const { return fCount; }
/** Return the array of T elements. Will be NULL if count == 0
*/
@@ -295,12 +295,12 @@
/** Return the nth element in the array
*/
T& operator[](int index) const {
- SkASSERT((unsigned)index < fCount);
+ SkASSERT(index < fCount);
return fArray[index];
}
private:
- size_t fCount;
+ int fCount;
T* fArray;
// since we come right after fArray, fStorage should be properly aligned
char fStorage[N * sizeof(T)];
« no previous file with comments | « no previous file | include/core/SkWriter32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698