anonymous objects

This commit is contained in:
Hieu Hoang 2015-12-31 00:58:48 +00:00
parent d0951cde0a
commit 844e8a16c4
2 changed files with 2 additions and 6 deletions

View File

@ -20,8 +20,7 @@ namespace Moses2
namespace NSCubePruning
{
MiniStack::MiniStack(const Manager &mgr)
:m_alloc(mgr.GetPool())
,m_coll(m_alloc)
:m_coll(MemPoolAllocator<const Hypothesis*>(mgr.GetPool()))
,m_sortedHypos(NULL)
{}
@ -88,8 +87,7 @@ void MiniStack::SortAndPruneHypos(const Manager &mgr) const
///////////////////////////////////////////////////////////////
Stack::Stack(const Manager &mgr)
:m_mgr(mgr)
,m_alloc(mgr.GetPool())
,m_coll(m_alloc)
,m_coll(MemPoolAllocator< std::pair<HypoCoverage, MiniStack*> >(mgr.GetPool()))
{
}

View File

@ -43,7 +43,6 @@ public:
CubeEdge::Hypotheses &GetSortedAndPruneHypos(const Manager &mgr) const;
protected:
MemPoolAllocator<const Hypothesis*> m_alloc;
_HCType m_coll;
mutable CubeEdge::Hypotheses *m_sortedHypos;
@ -85,7 +84,6 @@ public:
protected:
const Manager &m_mgr;
MemPoolAllocator< std::pair<HypoCoverage, MiniStack*> > m_alloc;
Coll m_coll;
StackAdd Add(const Hypothesis *hypo);