diff options
author | sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-12 14:36:57 +0000 |
---|---|---|
committer | sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-12 14:36:57 +0000 |
commit | 93c7ee34dc5c8f6bfad65809f4b39f8d00d7f0d4 (patch) | |
tree | d4352361bd821b020d856cc720feb3235f8d9203 /src/animator | |
parent | a041b954ffd318ebbbee9aab1c11f8c563954a1f (diff) |
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
Diffstat (limited to 'src/animator')
-rw-r--r-- | src/animator/SkAnimator.cpp | 16 | ||||
-rw-r--r-- | src/animator/SkDisplayMovie.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkDrawBitmap.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkDrawColor.cpp | 4 | ||||
-rw-r--r-- | src/animator/SkDrawExtraPathEffect.cpp | 5 | ||||
-rw-r--r-- | src/animator/SkDrawGroup.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkDump.cpp | 4 | ||||
-rw-r--r-- | src/animator/SkHitClear.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkHitTest.cpp | 6 | ||||
-rw-r--r-- | src/animator/SkPaintParts.cpp | 2 |
10 files changed, 23 insertions, 22 deletions
diff --git a/src/animator/SkAnimator.cpp b/src/animator/SkAnimator.cpp index acbb808c5c..6d8fb62db5 100644 --- a/src/animator/SkAnimator.cpp +++ b/src/animator/SkAnimator.cpp @@ -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() { } diff --git a/src/animator/SkDisplayMovie.cpp b/src/animator/SkDisplayMovie.cpp index f1f82e3201..ea832dcb4c 100644 --- a/src/animator/SkDisplayMovie.cpp +++ b/src/animator/SkDisplayMovie.cpp @@ -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; diff --git a/src/animator/SkDrawBitmap.cpp b/src/animator/SkDrawBitmap.cpp index 4604a7110c..2a482d7584 100644 --- a/src/animator/SkDrawBitmap.cpp +++ b/src/animator/SkDrawBitmap.cpp @@ -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); diff --git a/src/animator/SkDrawColor.cpp b/src/animator/SkDrawColor.cpp index af0f04b910..b6bc261d71 100644 --- a/src/animator/SkDrawColor.cpp +++ b/src/animator/SkDrawColor.cpp @@ -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; } diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp index e624d195c0..e973dbf795 100644 --- a/src/animator/SkDrawExtraPathEffect.cpp +++ b/src/animator/SkDrawExtraPathEffect.cpp @@ -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()); } //////////////// diff --git a/src/animator/SkDrawGroup.cpp b/src/animator/SkDrawGroup.cpp index c56943462b..f4bc3c6308 100644 --- a/src/animator/SkDrawGroup.cpp +++ b/src/animator/SkDrawGroup.cpp @@ -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; diff --git a/src/animator/SkDump.cpp b/src/animator/SkDump.cpp index 563b0e104c..9f297e9d58 100644 --- a/src/animator/SkDump.cpp +++ b/src/animator/SkDump.cpp @@ -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); } diff --git a/src/animator/SkHitClear.cpp b/src/animator/SkHitClear.cpp index 96b1747596..3ac521ae64 100644 --- a/src/animator/SkHitClear.cpp +++ b/src/animator/SkHitClear.cpp @@ -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(); diff --git a/src/animator/SkHitTest.cpp b/src/animator/SkHitTest.cpp index 7506edc70e..79dd25bd5c 100644 --- a/src/animator/SkHitTest.cpp +++ b/src/animator/SkHitTest.cpp @@ -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 diff --git a/src/animator/SkPaintParts.cpp b/src/animator/SkPaintParts.cpp index da47178261..22119a4ff9 100644 --- a/src/animator/SkPaintParts.cpp +++ b/src/animator/SkPaintParts.cpp @@ -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); |