[Scipy-svn] r4701 - branches/refactor_fft/scipy/fftpack/backends/common
scipy-svn at scipy.org
scipy-svn at scipy.org
Mon Sep 8 04:53:04 EDT 2008
Author: cdavid
Date: 2008-09-08 03:53:01 -0500 (Mon, 08 Sep 2008)
New Revision: 4701
Modified:
branches/refactor_fft/scipy/fftpack/backends/common/cycliccache.h
Log:
Use std::vector to keep caches.
Modified: branches/refactor_fft/scipy/fftpack/backends/common/cycliccache.h
===================================================================
--- branches/refactor_fft/scipy/fftpack/backends/common/cycliccache.h 2008-09-08 08:05:22 UTC (rev 4700)
+++ branches/refactor_fft/scipy/fftpack/backends/common/cycliccache.h 2008-09-08 08:53:01 UTC (rev 4701)
@@ -1,6 +1,8 @@
#ifndef _CYCLIC_CACHE_H_
#define _CYCLIC_CACHE_H_
+#include <vector>
+
namespace fft {
class CacheId {
@@ -46,7 +48,7 @@
m_curn(0),
m_last(0)
{
- m_cache = new U*[n];
+ m_cache.resize(n);
};
@@ -57,8 +59,6 @@
for (i = 0; i < m_curn; ++i) {
delete m_cache[i];
}
-
- delete[] m_cache;
}
virtual U* get_cache(const T& id)
@@ -88,7 +88,7 @@
};
private:
- U** m_cache;
+ std::vector<U*> m_cache;
int m_n;
int m_curn;
int m_last;
More information about the Scipy-svn
mailing list