use namespace instead of static for template params

git-svn-id: http://skia.googlecode.com/svn/trunk@10354 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-07-25 14:46:22 +00:00
parent 5d1e5589fe
commit 56172676c6

View File

@ -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<SkScaledImageCache::Rec,
Key, key_from_rec, hash_from_key,