Removed unused parameters

I removed unused parameters wherever it was trivial to do so.
Review URL: https://codereview.chromium.org/12772003

git-svn-id: http://skia.googlecode.com/svn/trunk@8103 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
sugoi@google.com 2013-03-12 14:36:57 +00:00
parent a041b954ff
commit 93c7ee34dc
20 changed files with 39 additions and 47 deletions

View File

@ -15,7 +15,7 @@
// fractional, and the impl computes the center and radii, and uses them to
// reconstruct the edges of the circle.
// see bug# 1504910
static void test_circlebounds(SkCanvas* canvas) {
static void test_circlebounds(SkCanvas*) {
#ifdef SK_SCALAR_IS_FLOAT
SkRect r = { 1.39999998f, 1, 21.3999996f, 21 };
SkPath p;

View File

@ -18,7 +18,7 @@
//#define COLOR 0xFFFF8844
#define COLOR 0xFF888888
static void paint_proc0(SkPaint* paint) {
static void paint_proc0(SkPaint*) {
}
static void paint_proc1(SkPaint* paint) {

View File

@ -260,7 +260,7 @@ protected:
return this->INHERITED::onClick(click);
}
virtual bool handleKey(SkKey key) {
virtual bool handleKey(SkKey) {
this->inval(NULL);
return true;
}

View File

@ -77,7 +77,7 @@ protected:
return this->INHERITED::onClick(click);
}
virtual bool handleKey(SkKey key) {
virtual bool handleKey(SkKey) {
this->inval(NULL);
return true;
}

View File

@ -223,8 +223,8 @@ SkFieldType SkAnimator::getFieldType(const char* id, const char* fieldID) {
return getFieldType(field);
}
static bool getArrayCommon(const SkDisplayable* ae, const SkMemberInfo* ai,
int index, SkOperand* operand, SkDisplayTypes type) {
static bool getArrayCommon(const SkDisplayable* ae, const SkMemberInfo* ai,
int index, SkOperand* operand) {
const SkDisplayable* element = (const SkDisplayable*) ae;
const SkMemberInfo* info = (const SkMemberInfo*) ai;
SkASSERT(info->fType == SkType_Array);
@ -234,7 +234,7 @@ SkFieldType SkAnimator::getFieldType(const char* id, const char* fieldID) {
int32_t SkAnimator::getArrayInt(const SkDisplayable* ae,
const SkMemberInfo* ai, int index) {
SkOperand operand;
bool result = getArrayCommon(ae, ai, index, &operand, SkType_Int);
bool result = getArrayCommon(ae, ai, index, &operand);
return result ? operand.fS32 : SK_NaN32;
}
@ -251,7 +251,7 @@ int32_t SkAnimator::getArrayInt(const char* id, const char* fieldID, int index)
SkScalar SkAnimator::getArrayScalar(const SkDisplayable* ae,
const SkMemberInfo* ai, int index) {
SkOperand operand;
bool result = getArrayCommon(ae, ai, index, &operand, SkType_Float);
bool result = getArrayCommon(ae, ai, index, &operand);
return result ? operand.fScalar : SK_ScalarNaN;
}
@ -268,7 +268,7 @@ SkScalar SkAnimator::getArrayScalar(const char* id, const char* fieldID, int ind
const char* SkAnimator::getArrayString(const SkDisplayable* ae,
const SkMemberInfo* ai, int index) {
SkOperand operand;
bool result = getArrayCommon(ae, ai, index, &operand, SkType_String);
bool result = getArrayCommon(ae, ai, index, &operand);
return result ? operand.fString->c_str() : NULL;
}
@ -674,8 +674,8 @@ bool SkAnimator::NoLeaks() {
#endif
void SkAnimator::Init(bool runUnitTests) {
#ifdef SK_SUPPORT_UNITTEST
void SkAnimator::Init(bool runUnitTests) {
if (runUnitTests == false)
return;
static const struct {
@ -695,8 +695,10 @@ void SkAnimator::Init(bool runUnitTests) {
gUnitTests[i].fUnitTest();
SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName);
}
#endif
}
#else
void SkAnimator::Init(bool) {}
#endif
void SkAnimator::Term() {
}

View File

@ -101,7 +101,7 @@ void SkDisplayMovie::dumpEvents() {
}
#endif
bool SkDisplayMovie::enable(SkAnimateMaker& maker) {
bool SkDisplayMovie::enable(SkAnimateMaker&) {
if (fDecodedSuccessfully == false)
return false;
SkAnimateMaker* movieMaker = fMovie.fMaker;

View File

@ -85,7 +85,7 @@ void SkDrawBitmap::dump(SkAnimateMaker* maker) {
}
#endif
void SkDrawBitmap::onEndElement(SkAnimateMaker& maker) {
void SkDrawBitmap::onEndElement(SkAnimateMaker&) {
SkASSERT(format != (SkBitmap::Config) -1);
SkASSERT(width != -1);
SkASSERT(height != -1);

View File

@ -133,7 +133,7 @@ bool SkDrawColor::add() {
return false;
}
SkDisplayable* SkDrawColor::deepCopy(SkAnimateMaker* maker) {
SkDisplayable* SkDrawColor::deepCopy(SkAnimateMaker*) {
SkDrawColor* copy = new SkDrawColor();
copy->color = color;
copy->fHue = fHue;
@ -206,7 +206,7 @@ bool SkDrawColor::getProperty(int index, SkScriptValue* value) const {
return true;
}
void SkDrawColor::onEndElement(SkAnimateMaker& maker){
void SkDrawColor::onEndElement(SkAnimateMaker&) {
fDirty = true;
}

View File

@ -415,7 +415,7 @@ const char kDrawCornerPathEffectName[] = "pathEffect:corner";
class SkExtraPathEffects : public SkExtras {
public:
SkExtraPathEffects(SkAnimator* animator) :
SkExtraPathEffects() :
skDrawShape1DPathEffectType(SkType_Unknown),
skDrawShape2DPathEffectType(SkType_Unknown),
skDrawComposePathEffectType(SkType_Unknown),
@ -504,9 +504,8 @@ private:
SkDisplayTypes skDrawCornerPathEffectType;
};
void InitializeSkExtraPathEffects(SkAnimator* animator) {
animator->addExtras(new SkExtraPathEffects(animator));
animator->addExtras(new SkExtraPathEffects());
}
////////////////

View File

@ -196,7 +196,7 @@ bool SkGroup::hasEnable() const {
return true;
}
bool SkGroup::ifCondition(SkAnimateMaker& maker, SkDrawable* drawable,
bool SkGroup::ifCondition(SkAnimateMaker& maker, SkDrawable*,
SkString& conditionString) {
if (conditionString.size() == 0)
return true;

View File

@ -135,7 +135,7 @@ const SkMemberInfo SkDump::fInfo[] = {
DEFINE_GET_MEMBER(SkDump);
bool SkDump::enable(SkAnimateMaker& maker ) {
bool SkDump::enable(SkAnimateMaker&) {
return true;
}
@ -143,7 +143,7 @@ bool SkDump::hasEnable() const {
return true;
}
bool SkDump::setProperty(int index, SkScriptValue& ) {
bool SkDump::setProperty(int index, SkScriptValue&) {
return index <= SK_PROPERTY(posts);
}

View File

@ -19,7 +19,7 @@ const SkMemberInfo SkHitClear::fInfo[] = {
DEFINE_GET_MEMBER(SkHitClear);
bool SkHitClear::enable(SkAnimateMaker& maker) {
bool SkHitClear::enable(SkAnimateMaker&) {
for (int tIndex = 0; tIndex < targets.count(); tIndex++) {
SkDisplayable* target = targets[tIndex];
target->clearBounder();

View File

@ -25,7 +25,7 @@ DEFINE_GET_MEMBER(SkHitTest);
SkHitTest::SkHitTest() : value(false) {
}
bool SkHitTest::draw(SkAnimateMaker& maker) {
bool SkHitTest::draw(SkAnimateMaker&) {
hits.setCount(bullets.count());
value = false;
int bulletCount = bullets.count();
@ -51,7 +51,7 @@ bool SkHitTest::draw(SkAnimateMaker& maker) {
return false;
}
bool SkHitTest::enable(SkAnimateMaker& maker) {
bool SkHitTest::enable(SkAnimateMaker&) {
for (int bIndex = 0; bIndex < bullets.count(); bIndex++) {
SkDisplayable* bullet = bullets[bIndex];
bullet->enableBounder();
@ -67,7 +67,7 @@ bool SkHitTest::hasEnable() const {
return true;
}
const SkMemberInfo* SkHitTest::preferredChild(SkDisplayTypes type) {
const SkMemberInfo* SkHitTest::preferredChild(SkDisplayTypes) {
if (bullets.count() == 0)
return getMember("bullets");
return getMember("targets"); // !!! cwap! need to refer to member through enum like kScope instead

View File

@ -92,7 +92,7 @@ bool SkDrawTypeface::add() {
}
#ifdef SK_DUMP_ENABLED
void SkDrawTypeface::dump(SkAnimateMaker* maker) {
void SkDrawTypeface::dump(SkAnimateMaker*) {
SkDebugf("%*s<typeface fontName=\"%s\" ", SkDisplayList::fIndent, "", fontName.c_str());
SkString string;
SkDump::GetEnumString(SkType_FontStyle, style, &string);

View File

@ -59,8 +59,8 @@ public:
void reset();
protected:
virtual void incPtr(void* ptr) {}
virtual void decPtr(void* ptr) {}
virtual void incPtr(void*) {}
virtual void decPtr(void*) {}
private:
struct Pair {

View File

@ -193,10 +193,6 @@ void SkScan::HairRect(const SkRect& rect, const SkRasterClip& clip,
#include "SkPath.h"
#include "SkGeometry.h"
static bool quad_too_curvy(const SkPoint pts[3]) {
return true;
}
static int compute_int_quad_dist(const SkPoint pts[3]) {
// compute the vector between the control point ([1]) and the middle of the
// line connecting the start and end ([0] and [2])
@ -220,7 +216,7 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip, SkBlitter* blit
void (*lineproc)(const SkPoint&, const SkPoint&, const SkRegion* clip, SkBlitter*))
{
#if 1
if (level > 0 && quad_too_curvy(pts))
if (level > 0)
{
SkPoint tmp[5];
@ -247,15 +243,10 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip, SkBlitter* blit
#endif
}
static bool cubic_too_curvy(const SkPoint pts[4])
{
return true;
}
static void haircubic(const SkPoint pts[4], const SkRegion* clip, SkBlitter* blitter, int level,
void (*lineproc)(const SkPoint&, const SkPoint&, const SkRegion*, SkBlitter*))
{
if (level > 0 && cubic_too_curvy(pts))
if (level > 0)
{
SkPoint tmp[7];

View File

@ -38,7 +38,7 @@ public:
private:
GrEllipseEdgeEffect();
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE {
return true;
}

View File

@ -21,7 +21,7 @@ void SkView::Artist::inflate(const SkDOM& dom, const SkDOM::Node* node)
this->onInflate(dom, node);
}
void SkView::Artist::onInflate(const SkDOM& dom, const SkDOM::Node* node)
void SkView::Artist::onInflate(const SkDOM&, const SkDOM::Node*)
{
// subclass should override this as needed
}
@ -67,7 +67,7 @@ void SkView::Layout::inflate(const SkDOM& dom, const SkDOM::Node* node)
this->onInflate(dom, node);
}
void SkView::Layout::onInflate(const SkDOM& dom, const SkDOM::Node* node)
void SkView::Layout::onInflate(const SkDOM&, const SkDOM::Node*)
{
// subclass should override this as needed
}

View File

@ -348,12 +348,12 @@ bool SkWindow::onHandleChar(SkUnichar)
return false;
}
bool SkWindow::onHandleKey(SkKey key)
bool SkWindow::onHandleKey(SkKey)
{
return false;
}
bool SkWindow::onHandleKeyUp(SkKey key)
bool SkWindow::onHandleKeyUp(SkKey)
{
return false;
}

View File

@ -32,7 +32,7 @@ const int HEIGHT = 500;
const long EVENT_MASK = StructureNotifyMask|ButtonPressMask|ButtonReleaseMask
|ExposureMask|PointerMotionMask|KeyPressMask|KeyReleaseMask;
SkOSWindow::SkOSWindow(void* unused)
SkOSWindow::SkOSWindow(void*)
: fVi(NULL)
, fMSAASampleCount(0) {
fUnixWindow.fDisplay = NULL;
@ -380,10 +380,10 @@ bool SkOSWindow::onHandleChar(SkUnichar) {
return false;
}
bool SkOSWindow::onHandleKey(SkKey key) {
bool SkOSWindow::onHandleKey(SkKey) {
return false;
}
bool SkOSWindow::onHandleKeyUp(SkKey key) {
bool SkOSWindow::onHandleKeyUp(SkKey) {
return false;
}