From 844e8a16c42fb5699adc069bafc79a9fbbc203d4 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Thu, 31 Dec 2015 00:58:48 +0000 Subject: [PATCH] anonymous objects --- contrib/other-builds/moses2/Search/CubePruning/Stack.cpp | 6 ++---- contrib/other-builds/moses2/Search/CubePruning/Stack.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/other-builds/moses2/Search/CubePruning/Stack.cpp b/contrib/other-builds/moses2/Search/CubePruning/Stack.cpp index ebff783de..285e06f6f 100644 --- a/contrib/other-builds/moses2/Search/CubePruning/Stack.cpp +++ b/contrib/other-builds/moses2/Search/CubePruning/Stack.cpp @@ -20,8 +20,7 @@ namespace Moses2 namespace NSCubePruning { MiniStack::MiniStack(const Manager &mgr) -:m_alloc(mgr.GetPool()) -,m_coll(m_alloc) +:m_coll(MemPoolAllocator(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 >(mgr.GetPool())) { } diff --git a/contrib/other-builds/moses2/Search/CubePruning/Stack.h b/contrib/other-builds/moses2/Search/CubePruning/Stack.h index a109402fb..1a526e638 100644 --- a/contrib/other-builds/moses2/Search/CubePruning/Stack.h +++ b/contrib/other-builds/moses2/Search/CubePruning/Stack.h @@ -43,7 +43,6 @@ public: CubeEdge::Hypotheses &GetSortedAndPruneHypos(const Manager &mgr) const; protected: - MemPoolAllocator m_alloc; _HCType m_coll; mutable CubeEdge::Hypotheses *m_sortedHypos; @@ -85,7 +84,6 @@ public: protected: const Manager &m_mgr; - MemPoolAllocator< std::pair > m_alloc; Coll m_coll; StackAdd Add(const Hypothesis *hypo);