aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-22 15:46:00 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-22 15:46:00 +0000
commit28f9951849ee2f885a348d00e1ca04a1df7601b1 (patch)
tree7f1de2ac25f62ea321ee88d01335b6bc878e2b14 /src
parent4a71997e0d2ae1c08a80c3d0e59c73b2ceb50c5c (diff)
Fix a warning on linux.
Review URL: https://codereview.appspot.com/7392045 git-svn-id: http://skia.googlecode.com/svn/trunk@7823 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkTileGrid.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/SkTileGrid.h b/src/core/SkTileGrid.h
index 3f69f073b7..c0fd3ddaef 100644
--- a/src/core/SkTileGrid.h
+++ b/src/core/SkTileGrid.h
@@ -88,22 +88,20 @@ private:
*/
template <typename T>
void* SkTileGridNextDatum(SkTDArray<void*>** tileData, SkTDArray<int>& tileIndices) {
- bool haveVal = false;
- T* minVal;
+ T* minVal = NULL;
int tileCount = tileIndices.count();
// Find the next Datum
for (int tile = 0; tile < tileCount; ++tile) {
int pos = tileIndices[tile];
if (pos != SkTileGrid::kTileFinished) {
T* candidate = (T*)(*tileData[tile])[pos];
- if (!haveVal || (*candidate) < (*minVal)) {
+ if (NULL == minVal || (*candidate) < (*minVal)) {
minVal = candidate;
- haveVal = true;
}
}
}
// Increment indices past the next datum
- if (haveVal) {
+ if (minVal != NULL) {
for (int tile = 0; tile < tileCount; ++tile) {
int pos = tileIndices[tile];
if (pos != SkTileGrid::kTileFinished && (*tileData[tile])[pos] == minVal) {