aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-05-04 18:52:54 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-05-04 18:52:54 +0000
commita6260ff5696e3ae45f295463eaeada2cd75a8b85 (patch)
treece57d62445a0429836b86b2caeadc55041572111
parenta8a8b8b80e2b6be2dd83ef2c1333851fd03a87d7 (diff)
update license header
git-svn-id: http://skia.googlecode.com/svn/trunk@166 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkColorTable.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp
index 1f92caf669..7c3676d3dd 100644
--- a/src/core/SkColorTable.cpp
+++ b/src/core/SkColorTable.cpp
@@ -1,19 +1,18 @@
-/* libs/graphics/sgl/SkColorTable.cpp
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright (C) 2006-2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "SkBitmap.h"
#include "SkFlattenable.h"
@@ -41,7 +40,8 @@ SkColorTable::SkColorTable(const SkColorTable& src) {
fFlags = src.fFlags;
int count = src.count();
fCount = SkToU16(count);
- fColors = (SkPMColor*)sk_malloc_throw(count * sizeof(SkPMColor));
+ fColors = reinterpret_cast<SkPMColor*>(
+ sk_malloc_throw(count * sizeof(SkPMColor)));
memcpy(fColors, src.fColors, count * sizeof(SkPMColor));
SkDEBUGCODE(fColorLockCount = 0;)
@@ -57,7 +57,8 @@ SkColorTable::SkColorTable(const SkPMColor colors[], int count)
count = 256;
fCount = SkToU16(count);
- fColors = (SkPMColor*)sk_malloc_throw(count * sizeof(SkPMColor));
+ fColors = reinterpret_cast<SkPMColor*>(
+ sk_malloc_throw(count * sizeof(SkPMColor)));
if (colors)
memcpy(fColors, colors, count * sizeof(SkPMColor));