diff --git a/moses2/FF/StatefulFeatureFunction.h b/moses2/FF/StatefulFeatureFunction.h index 7cb3eaae97..c88eddead9 100644 --- a/moses2/FF/StatefulFeatureFunction.h +++ b/moses2/FF/StatefulFeatureFunction.h @@ -5,8 +5,7 @@ * Author: hieu */ -#ifndef STATEFULFEATUREFUNCTION_H_ -#define STATEFULFEATUREFUNCTION_H_ +#pragma once #include "FeatureFunction.h" #include "FFState.h" @@ -63,4 +62,3 @@ class StatefulFeatureFunction: public FeatureFunction } -#endif /* STATEFULFEATUREFUNCTION_H_ */ diff --git a/moses2/FF/StatelessFeatureFunction.h b/moses2/FF/StatelessFeatureFunction.h index 249e4fdfe4..0ad0aaba4f 100644 --- a/moses2/FF/StatelessFeatureFunction.h +++ b/moses2/FF/StatelessFeatureFunction.h @@ -5,8 +5,7 @@ * Author: hieu */ -#ifndef STATELESSFEATUREFUNCTION_H_ -#define STATELESSFEATUREFUNCTION_H_ +#pragma once #include "FeatureFunction.h" @@ -22,4 +21,3 @@ class StatelessFeatureFunction: public FeatureFunction } -#endif /* STATELESSFEATUREFUNCTION_H_ */ diff --git a/moses2/HypothesisColl.h b/moses2/HypothesisColl.h index f00a2efb07..0c89e8382f 100644 --- a/moses2/HypothesisColl.h +++ b/moses2/HypothesisColl.h @@ -6,7 +6,6 @@ */ #pragma once #include -#include #include "HypothesisBase.h" #include "MemPoolAllocator.h" #include "Recycler.h" diff --git a/moses2/Main.cpp b/moses2/Main.cpp index cf833760aa..dfdb9de3a1 100644 --- a/moses2/Main.cpp +++ b/moses2/Main.cpp @@ -107,7 +107,7 @@ void Temp() Moses2::MemPool pool; Moses2::MemPoolAllocator a(pool); - boost::unordered_set, std::equal_to, Moses2::MemPoolAllocator > s(a); + std::unordered_set, std::equal_to, Moses2::MemPoolAllocator > s(a); s.insert(3); s.insert(4); s.insert(3); diff --git a/moses2/Phrase.h b/moses2/Phrase.h index 1007014837..a6f4961848 100644 --- a/moses2/Phrase.h +++ b/moses2/Phrase.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include diff --git a/moses2/PhraseBased/CubePruningMiniStack/Misc.h b/moses2/PhraseBased/CubePruningMiniStack/Misc.h index 4fc576cbaa..8e746a83ec 100644 --- a/moses2/PhraseBased/CubePruningMiniStack/Misc.h +++ b/moses2/PhraseBased/CubePruningMiniStack/Misc.h @@ -7,7 +7,7 @@ #pragma once #include #include -#include +#include #include #include #include "../../legacy/Range.h" @@ -70,7 +70,7 @@ class CubeEdge std::vector >, QueueItemOrderer> Queue; typedef std::pair SeenPositionItem; - typedef boost::unordered_set, + typedef std::unordered_set, std::equal_to, MemPoolAllocator > SeenPositions; const Hypotheses &hypos; diff --git a/moses2/PhraseBased/CubePruningMiniStack/Search.cpp b/moses2/PhraseBased/CubePruningMiniStack/Search.cpp index 74103d2119..785eff9262 100644 --- a/moses2/PhraseBased/CubePruningMiniStack/Search.cpp +++ b/moses2/PhraseBased/CubePruningMiniStack/Search.cpp @@ -110,7 +110,7 @@ void Search::Decode(size_t stackInd) /* cerr << "edges: "; - boost::unordered_set uniqueBM; + std::unordered_set uniqueBM; BOOST_FOREACH(CubeEdge *edge, edges) { uniqueBM.insert(&edge->newBitmap); //cerr << *edge << " "; diff --git a/moses2/PhraseBased/CubePruningMiniStack/Stack.h b/moses2/PhraseBased/CubePruningMiniStack/Stack.h index abd564b3f0..c3a14b222c 100644 --- a/moses2/PhraseBased/CubePruningMiniStack/Stack.h +++ b/moses2/PhraseBased/CubePruningMiniStack/Stack.h @@ -6,7 +6,6 @@ */ #pragma once #include -#include #include #include "../Hypothesis.h" #include "../../TypeDef.h" diff --git a/moses2/PhraseBased/Manager.cpp b/moses2/PhraseBased/Manager.cpp index 28073d4f61..0a1f51dbd6 100644 --- a/moses2/PhraseBased/Manager.cpp +++ b/moses2/PhraseBased/Manager.cpp @@ -6,7 +6,7 @@ */ #include #include -#include +#include #include #include #include "Manager.h" @@ -218,7 +218,7 @@ std::string Manager::OutputNBest() { arcLists.Sort(); - boost::unordered_set distinctHypos; + std::unordered_set distinctHypos; TrellisPaths contenders; m_search->AddInitialTrellisPaths(contenders); diff --git a/moses2/PhraseBased/Normal/Stack.h b/moses2/PhraseBased/Normal/Stack.h index 4ad707ce41..62675a5c18 100644 --- a/moses2/PhraseBased/Normal/Stack.h +++ b/moses2/PhraseBased/Normal/Stack.h @@ -6,7 +6,6 @@ */ #pragma once -#include #include #include "../Hypothesis.h" #include "../../TypeDef.h" diff --git a/moses2/SCFG/Misc.h b/moses2/SCFG/Misc.h index 27b9df79a4..6eb107499c 100644 --- a/moses2/SCFG/Misc.h +++ b/moses2/SCFG/Misc.h @@ -7,7 +7,7 @@ #pragma once #include #include -#include +#include #include "../HypothesisColl.h" #include "../Vector.h" #include "Hypothesis.h" @@ -60,7 +60,7 @@ class SeenPositions protected: - typedef boost::unordered_set, UnorderedComparer > Coll; Coll m_coll; }; diff --git a/moses2/SCFG/nbest/NBests.h b/moses2/SCFG/nbest/NBests.h index 97fe9a025e..7cddec1be5 100644 --- a/moses2/SCFG/nbest/NBests.h +++ b/moses2/SCFG/nbest/NBests.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "NBest.h" namespace Moses2 @@ -18,7 +18,7 @@ class NBests { public: Contenders contenders; - boost::unordered_set distinctHypos; + std::unordered_set distinctHypos; NBests(const SCFG::Manager &mgr, const ArcList &arcList, diff --git a/moses2/defer/CubePruningBitmapStack/Misc.h b/moses2/defer/CubePruningBitmapStack/Misc.h index 355f8f4c25..e0acdcd1ab 100644 --- a/moses2/defer/CubePruningBitmapStack/Misc.h +++ b/moses2/defer/CubePruningBitmapStack/Misc.h @@ -7,7 +7,6 @@ #pragma once #include #include -#include #include #include #include "../../legacy/Range.h" @@ -72,7 +71,7 @@ class CubeEdge QueueItemOrderer> Queue; typedef std::pair SeenPositionItem; - typedef boost::unordered_set, std::equal_to > SeenPositions; diff --git a/moses2/defer/CubePruningBitmapStack/Search.cpp b/moses2/defer/CubePruningBitmapStack/Search.cpp index 8c06f13402..19e2477969 100644 --- a/moses2/defer/CubePruningBitmapStack/Search.cpp +++ b/moses2/defer/CubePruningBitmapStack/Search.cpp @@ -96,7 +96,7 @@ void Search::Decode(size_t stackInd) /* cerr << "edges: "; - boost::unordered_set uniqueBM; + std::unordered_set uniqueBM; BOOST_FOREACH(CubeEdge *edge, edges) { uniqueBM.insert(&edge->newBitmap); //cerr << *edge << " "; diff --git a/moses2/defer/CubePruningBitmapStack/Stack.h b/moses2/defer/CubePruningBitmapStack/Stack.h index f052fab428..b4d6ee1be9 100644 --- a/moses2/defer/CubePruningBitmapStack/Stack.h +++ b/moses2/defer/CubePruningBitmapStack/Stack.h @@ -6,7 +6,6 @@ */ #pragma once #include -#include #include #include "../Hypothesis.h" #include "../../TypeDef.h" @@ -27,7 +26,7 @@ typedef Vector Hypotheses; class MiniStack { public: - typedef boost::unordered_set, UnorderedComparer > _HCType; diff --git a/moses2/defer/CubePruningCardinalStack/Misc.h b/moses2/defer/CubePruningCardinalStack/Misc.h index 9f5d28f1e7..d04c299d1a 100644 --- a/moses2/defer/CubePruningCardinalStack/Misc.h +++ b/moses2/defer/CubePruningCardinalStack/Misc.h @@ -7,7 +7,6 @@ #pragma once #include #include -#include #include #include #include "../../legacy/Range.h" @@ -72,7 +71,7 @@ class CubeEdge QueueItemOrderer> Queue; typedef std::pair SeenPositionItem; - typedef boost::unordered_set, std::equal_to > SeenPositions; diff --git a/moses2/defer/CubePruningCardinalStack/Search.cpp b/moses2/defer/CubePruningCardinalStack/Search.cpp index 23cae74ebc..6f72a53f8d 100644 --- a/moses2/defer/CubePruningCardinalStack/Search.cpp +++ b/moses2/defer/CubePruningCardinalStack/Search.cpp @@ -96,7 +96,7 @@ void Search::Decode(size_t stackInd) /* cerr << "edges: "; - boost::unordered_set uniqueBM; + std::unordered_set uniqueBM; BOOST_FOREACH(CubeEdge *edge, edges) { uniqueBM.insert(&edge->newBitmap); //cerr << *edge << " "; diff --git a/moses2/defer/CubePruningCardinalStack/Stack.h b/moses2/defer/CubePruningCardinalStack/Stack.h index 94e987b7b9..06ca54a576 100644 --- a/moses2/defer/CubePruningCardinalStack/Stack.h +++ b/moses2/defer/CubePruningCardinalStack/Stack.h @@ -6,7 +6,6 @@ */ #pragma once #include -#include #include #include "../Hypothesis.h" #include "../../TypeDef.h" @@ -29,7 +28,7 @@ typedef Vector Hypotheses; class Stack { protected: - typedef boost::unordered_set, UnorderedComparer > _HCType; diff --git a/moses2/defer/CubePruningPerBitmap/Misc.h b/moses2/defer/CubePruningPerBitmap/Misc.h index 3fa22f9a6b..6a17e66a32 100644 --- a/moses2/defer/CubePruningPerBitmap/Misc.h +++ b/moses2/defer/CubePruningPerBitmap/Misc.h @@ -7,7 +7,6 @@ #pragma once #include #include -#include #include #include #include "../../legacy/Range.h" @@ -72,7 +71,7 @@ class CubeEdge QueueItemOrderer> Queue; typedef std::pair SeenPositionItem; - typedef boost::unordered_set, std::equal_to > SeenPositions; diff --git a/moses2/defer/CubePruningPerMiniStack/Misc.h b/moses2/defer/CubePruningPerMiniStack/Misc.h index 511fd42f57..7b48e31bd2 100644 --- a/moses2/defer/CubePruningPerMiniStack/Misc.h +++ b/moses2/defer/CubePruningPerMiniStack/Misc.h @@ -7,7 +7,6 @@ #pragma once #include #include -#include #include #include #include "../../legacy/Range.h" @@ -72,7 +71,7 @@ class CubeEdge QueueItemOrderer> Queue; typedef std::pair SeenPositionItem; - typedef boost::unordered_set, std::equal_to > SeenPositions; diff --git a/moses2/legacy/Bitmaps.h b/moses2/legacy/Bitmaps.h index aa0ea8f82e..f07318f933 100644 --- a/moses2/legacy/Bitmaps.h +++ b/moses2/legacy/Bitmaps.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include diff --git a/moses2/legacy/FactorCollection.h b/moses2/legacy/FactorCollection.h index 1b29dee699..fb6a646f41 100644 --- a/moses2/legacy/FactorCollection.h +++ b/moses2/legacy/FactorCollection.h @@ -31,7 +31,7 @@ #endif #include "util/murmur_hash.hh" -#include +#include #include #include @@ -82,7 +82,7 @@ class FactorCollection return left.in.GetString() == right.in.GetString(); } }; - typedef boost::unordered_set Set; + typedef std::unordered_set Set; Set m_set; Set m_setNonTerminal;