summaryrefslogtreecommitdiff
path: root/extractor/phrase_location.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-02-01 16:11:10 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-02-01 16:11:10 +0000
commit252fb164c208ec8f3005f8a652eb3b48c0644e3d (patch)
tree7199cb668e77ef89c7bcccb37d70554e3b52c2a5 /extractor/phrase_location.cc
parent4ab84a0be28fdb6c0c421fe5ba5e09cfa298f2d1 (diff)
Second working commit.
Diffstat (limited to 'extractor/phrase_location.cc')
-rw-r--r--extractor/phrase_location.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/extractor/phrase_location.cc b/extractor/phrase_location.cc
index b5b68549..984407c5 100644
--- a/extractor/phrase_location.cc
+++ b/extractor/phrase_location.cc
@@ -1,16 +1,12 @@
#include "phrase_location.h"
-#include <cstdio>
-
PhraseLocation::PhraseLocation(int sa_low, int sa_high) :
- sa_low(sa_low), sa_high(sa_high),
- matchings(shared_ptr<vector<int> >()),
- num_subpatterns(0) {}
+ sa_low(sa_low), sa_high(sa_high), num_subpatterns(0) {}
-PhraseLocation::PhraseLocation(shared_ptr<vector<int> > matchings,
+PhraseLocation::PhraseLocation(const vector<int>& matchings,
int num_subpatterns) :
sa_high(0), sa_low(0),
- matchings(matchings),
+ matchings(make_shared<vector<int> >(matchings)),
num_subpatterns(num_subpatterns) {}
bool PhraseLocation::IsEmpty() {