diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-01-27 00:31:24 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-01-27 00:31:24 +0000 |
commit | 8bc5ac336d5d684341a05e97d1cb1b18ecba0331 (patch) | |
tree | f4564108f73b3bb9be177633eca4053810c225e9 /src/cachestorenids.h | |
parent | dfd5f8696787d18ae688b662040289f84b667fdd (diff) | |
download | libbu++-8bc5ac336d5d684341a05e97d1cb1b18ecba0331.tar.gz libbu++-8bc5ac336d5d684341a05e97d1cb1b18ecba0331.tar.bz2 libbu++-8bc5ac336d5d684341a05e97d1cb1b18ecba0331.tar.xz libbu++-8bc5ac336d5d684341a05e97d1cb1b18ecba0331.zip |
Hey, I think that'll fix some things valgrind was bitching about. Apparently
BitString is...not so good...I may have to rewrite big chunks.
Diffstat (limited to '')
-rw-r--r-- | src/cachestorenids.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cachestorenids.h b/src/cachestorenids.h index 0d8ff64..62d1555 100644 --- a/src/cachestorenids.h +++ b/src/cachestorenids.h | |||
@@ -10,6 +10,9 @@ | |||
10 | namespace Bu | 10 | namespace Bu |
11 | { | 11 | { |
12 | template<class obtype, class keytype> | 12 | template<class obtype, class keytype> |
13 | keytype __cacheGetKey( const obtype *pObj ); | ||
14 | |||
15 | template<class obtype, class keytype> | ||
13 | class CacheStoreNids : public CacheStore<obtype, keytype> | 16 | class CacheStoreNids : public CacheStore<obtype, keytype> |
14 | { | 17 | { |
15 | public: | 18 | public: |
@@ -62,11 +65,9 @@ namespace Bu | |||
62 | delete pObj; | 65 | delete pObj; |
63 | } | 66 | } |
64 | 67 | ||
65 | virtual keytype getKey( obtype *pSrc )=0; | ||
66 | |||
67 | virtual keytype create( obtype *pSrc ) | 68 | virtual keytype create( obtype *pSrc ) |
68 | { | 69 | { |
69 | keytype key = getKey( pSrc ); | 70 | keytype key = __cacheGetKey<obtype,keytype>( pSrc ); |
70 | int iStream = nStore.createStream(); | 71 | int iStream = nStore.createStream(); |
71 | hId.insert( key, iStream ); | 72 | hId.insert( key, iStream ); |
72 | printf("Creating stream: %d\n", iStream ); | 73 | printf("Creating stream: %d\n", iStream ); |