remove more unused code

This commit is contained in:
Akash Mozumdar 2018-06-12 19:31:52 -04:00
parent 6d7a800a56
commit 1dbaff780c

View File

@ -14,12 +14,7 @@ void Release(const T &p) { delete p; }
template<> \ template<> \
void Release<T>(const T &p) {} void Release<T>(const T &p) {}
template<class T> template<class T, int default_size>
struct BinaryEqual {
bool operator ()(const T &a, const T &b, DWORD) { return a == b; }
};
template<class T, int default_size, class fComp=BinaryEqual<T> >
class MyVector class MyVector
{ {
public: public:
@ -104,54 +99,11 @@ protected:
LeaveCriticalSection(&cs_store); LeaveCriticalSection(&cs_store);
return status; return status;
} }
int Find(const T &item, int start = 0, DWORD control = 0)
{
int c = -1;
for (int i=start; i < used; i++)
if (fCmp(storage[i],item,control)) {
c=i;
break;
}
//if (storage[i]==item) {c=i;break;}
return c;
}
CRITICAL_SECTION cs_store; CRITICAL_SECTION cs_store;
int size, int size,
used; used;
T *storage; T *storage;
fComp fCmp;
}; };
// EOF // EOF
/*
#ifndef ITH_STACK
#define ITH_STACK
template<class T, int default_size>
class MyStack
{
public:
MyStack(): index(0) {}
void push_back(const T& e)
{
if (index<default_size)
s[index++]=e;
}
void pop_back()
{
index--;
}
T& back()
{
return s[index-1];
}
T& operator[](int i) {return s[i];}
int size() {return index;}
private:
int index;
T s[default_size];
};
#endif
*/