From 56172676c6f108af7daeffb75c7f9d5c792544a1 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 25 Jul 2013 14:46:22 +0000 Subject: [PATCH] use namespace instead of static for template params git-svn-id: http://skia.googlecode.com/svn/trunk@10354 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkScaledImageCache.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp index 147697af4e..8d34dfbcc3 100644 --- a/src/core/SkScaledImageCache.cpp +++ b/src/core/SkScaledImageCache.cpp @@ -129,17 +129,19 @@ struct SkScaledImageCache::Rec { #include "SkTDynamicHash.h" -static const Key& key_from_rec(const SkScaledImageCache::Rec& rec) { +namespace { // can't use static functions w/ template parameters +const Key& key_from_rec(const SkScaledImageCache::Rec& rec) { return rec.fKey; } -static uint32_t hash_from_key(const Key& key) { +uint32_t hash_from_key(const Key& key) { return key.fHash; } -static bool eq_rec_key(const SkScaledImageCache::Rec& rec, const Key& key) { +bool eq_rec_key(const SkScaledImageCache::Rec& rec, const Key& key) { return rec.fKey == key; } +} class SkScaledImageCache::Hash : public SkTDynamicHash