From 751961d4711184f1c9b6f29811ae1e7b4b3ce37c Mon Sep 17 00:00:00 2001 From: "chudy@google.com" Date: Tue, 31 Jul 2012 20:07:42 +0000 Subject: [PATCH] Getting rid of compile-time warnings Review URL: https://codereview.appspot.com/6447071 git-svn-id: http://skia.googlecode.com/svn/trunk@4868 2bbb7eff-a529-9590-31e7-b0007b416f81 --- debugger/QT/SkCanvasWidget.cpp | 2 +- debugger/SkDebugCanvas.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debugger/QT/SkCanvasWidget.cpp b/debugger/QT/SkCanvasWidget.cpp index c560aec3b5..1056bbba20 100644 --- a/debugger/QT/SkCanvasWidget.cpp +++ b/debugger/QT/SkCanvasWidget.cpp @@ -76,7 +76,7 @@ void SkCanvasWidget::mouseMoveEvent(QMouseEvent* event) { void SkCanvasWidget::mousePressEvent(QMouseEvent* event) { fPreviousPoint.set(event->globalX(), event->globalY()); - emit hitChanged(fDebugCanvas->getLayerAtPoint(event->x(), event->y(), + emit hitChanged(fDebugCanvas->getCommandAtPoint(event->x(), event->y(), fIndex, fTransform, fScaleFactor)); } diff --git a/debugger/SkDebugCanvas.cpp b/debugger/SkDebugCanvas.cpp index 9819858e3f..5fe1503e24 100644 --- a/debugger/SkDebugCanvas.cpp +++ b/debugger/SkDebugCanvas.cpp @@ -51,7 +51,7 @@ int SkDebugCanvas::getCommandAtPoint(int x, int y, int index, } int layer = 0; - int prev = bitmap.getColor(0,0); + SkColor prev = bitmap.getColor(0,0); for (int i = 0; i < index; i++) { if (commandVector[i]->isVisible()) { commandVector[i]->execute(&canvas); @@ -67,7 +67,7 @@ int SkDebugCanvas::getCommandAtPoint(int x, int y, int index, void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) { int counter = 0; SkASSERT(!commandVector.empty()); - SkASSERT(index < commandVector.size()); + SkASSERT(index < (int)commandVector.size()); for (int i = 0; i <= index; i++) { if (i == index && fFilter) { SkPaint p; @@ -90,17 +90,17 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index) { } SkDrawCommand* SkDebugCanvas::getDrawCommandAt(int index) { - SkASSERT(index < commandVector.size()); + SkASSERT(index < (int)commandVector.size()); return commandVector[index]; } std::vector* SkDebugCanvas::getCommandInfoAt(int index) { - SkASSERT(index < commandVector.size()); + SkASSERT(index < (int)commandVector.size()); return commandVector[index]->Info(); } bool SkDebugCanvas::getDrawCommandVisibilityAt(int index) { - SkASSERT(index < commandVector.size()); + SkASSERT(index < (int)commandVector.size()); return commandVector[index]->isVisible(); } @@ -266,6 +266,6 @@ bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { } void SkDebugCanvas::toggleCommand(int index, bool toggle) { - SkASSERT(index < commandVector.size()); + SkASSERT(index < (int)commandVector.size()); commandVector[index]->setVisible(toggle); }