landing http://codereview.appspot.com/6306095/ by guanqun
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 19 Jun 2012 15:27:46 +0000 (15:27 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 19 Jun 2012 15:27:46 +0000 (15:27 +0000)
fix the following warning for SkColorTable

../src/core/SkColorTable.cpp: In copy constructor
‘SkColorTable::SkColorTable(const SkColorTable&)’:
../src/core/SkColorTable.cpp:30:1: warning: base class ‘class SkFlattenable’
should be explicitly initialized in the copy constructor [-Wextra]

git-svn-id: http://skia.googlecode.com/svn/trunk@4280 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkColorTable.cpp

index 921d659..3797fbd 100644 (file)
@@ -27,7 +27,9 @@ SkColorTable::SkColorTable(int count)
     SkDEBUGCODE(f16BitCacheLockCount = 0;)
 }
 
-SkColorTable::SkColorTable(const SkColorTable& src) {
+// As copy constructor is hidden in the class hierarchy, we need to call
+// default constructor explicitly to suppress a compiler warning.
+SkColorTable::SkColorTable(const SkColorTable& src) : INHERITED() {
     f16BitCache = NULL;
     fFlags = src.fFlags;
     int count = src.count();