Remove WXARC_MEMBER_TEMPLATES and always use member templates
Member template functions are supported by all current compilers as they are already used in other places without any problems, so there is no need to test for this.
This commit is contained in:
parent
7ee8ea2d5b
commit
67b8ca5ef1
1 changed files with 0 additions and 46 deletions
|
|
@ -24,22 +24,6 @@
|
|||
using std::string;
|
||||
|
||||
|
||||
// Check whether member templates can be used
|
||||
//
|
||||
#if defined __GNUC__
|
||||
# define WXARC_MEMBER_TEMPLATES
|
||||
#endif
|
||||
#if defined _MSC_VER && _MSC_VER >= 1310 && !defined __WIN64__
|
||||
# define WXARC_MEMBER_TEMPLATES
|
||||
#endif
|
||||
#if defined __HP_aCC && __HP_aCC > 33300
|
||||
# define WXARC_MEMBER_TEMPLATES
|
||||
#endif
|
||||
#if defined __SUNPRO_CC && __SUNPRO_CC > 0x500
|
||||
# define WXARC_MEMBER_TEMPLATES
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// A class to hold a test entry
|
||||
|
||||
|
|
@ -992,13 +976,7 @@ void ArchiveTestCase<ClassFactoryT>::TestIterator(wxInputStream& in)
|
|||
wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
|
||||
size_t count = 0;
|
||||
|
||||
#ifdef WXARC_MEMBER_TEMPLATES
|
||||
ArchiveCatalog cat((IterT)*arc, IterT());
|
||||
#else
|
||||
ArchiveCatalog cat;
|
||||
for (IterT i(*arc); i != IterT(); ++i)
|
||||
cat.push_back(*i);
|
||||
#endif
|
||||
|
||||
for (CatalogIter it = cat.begin(); it != cat.end(); ++it) {
|
||||
wxScopedPtr<EntryT> entry(*it);
|
||||
|
|
@ -1021,13 +999,7 @@ void ArchiveTestCase<ClassFactoryT>::TestPairIterator(wxInputStream& in)
|
|||
wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
|
||||
size_t count = 0;
|
||||
|
||||
#ifdef WXARC_MEMBER_TEMPLATES
|
||||
ArchiveCatalog cat((PairIterT)*arc, PairIterT());
|
||||
#else
|
||||
ArchiveCatalog cat;
|
||||
for (PairIterT i(*arc); i != PairIterT(); ++i)
|
||||
cat.insert(*i);
|
||||
#endif
|
||||
|
||||
for (CatalogIter it = cat.begin(); it != cat.end(); ++it) {
|
||||
wxScopedPtr<EntryT> entry(it->second);
|
||||
|
|
@ -1049,13 +1021,7 @@ void ArchiveTestCase<ClassFactoryT>::TestSmartIterator(wxInputStream& in)
|
|||
|
||||
wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
|
||||
|
||||
#ifdef WXARC_MEMBER_TEMPLATES
|
||||
ArchiveCatalog cat((Iter)*arc, Iter());
|
||||
#else
|
||||
ArchiveCatalog cat;
|
||||
for (Iter i(*arc); i != Iter(); ++i)
|
||||
cat.push_back(*i);
|
||||
#endif
|
||||
|
||||
CPPUNIT_ASSERT(m_testEntries.size() == cat.size());
|
||||
|
||||
|
|
@ -1080,13 +1046,7 @@ void ArchiveTestCase<ClassFactoryT>::TestSmartPairIterator(wxInputStream& in)
|
|||
|
||||
wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
|
||||
|
||||
#ifdef WXARC_MEMBER_TEMPLATES
|
||||
ArchiveCatalog cat((PairIter)*arc, PairIter());
|
||||
#else
|
||||
ArchiveCatalog cat;
|
||||
for (PairIter i(*arc); i != PairIter(); ++i)
|
||||
cat.insert(*i);
|
||||
#endif
|
||||
|
||||
CPPUNIT_ASSERT(m_testEntries.size() == cat.size());
|
||||
|
||||
|
|
@ -1110,13 +1070,7 @@ void ArchiveTestCase<ClassFactoryT>::ReadSimultaneous(TestInputStream& in)
|
|||
wxScopedPtr<InputStreamT> arc2(m_factory->NewStream(in2));
|
||||
|
||||
// load the catalog
|
||||
#ifdef WXARC_MEMBER_TEMPLATES
|
||||
ArchiveCatalog cat((PairIter)*arc, PairIter());
|
||||
#else
|
||||
ArchiveCatalog cat;
|
||||
for (PairIter i(*arc); i != PairIter(); ++i)
|
||||
cat.insert(*i);
|
||||
#endif
|
||||
|
||||
// the names of two entries to read
|
||||
const wxChar *name = wxT("text/small");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue