summaryrefslogtreecommitdiff
path: root/extractor/alignment.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-05-23 20:42:26 +0100
committerPaul Baltescu <pauldb89@gmail.com>2013-05-23 20:42:26 +0100
commit1f9e57479e1c03d208e0b2b7bf007426e8a16dab (patch)
tree41176fdd936eba591cd2d88ea1f7a2ad76f8cc36 /extractor/alignment.cc
parent124878154b88819d35e78a42b854054bfc90e1b1 (diff)
parentfc3d47b81448c7537ed7951aea81ddcbd95bc18a (diff)
Merge branch 'master' of github.com:pauldb89/cdec
Diffstat (limited to 'extractor/alignment.cc')
-rw-r--r--extractor/alignment.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/extractor/alignment.cc b/extractor/alignment.cc
index f8326886..68bfde1a 100644
--- a/extractor/alignment.cc
+++ b/extractor/alignment.cc
@@ -21,7 +21,7 @@ Alignment::Alignment(const string& filename) {
while (getline(infile, line)) {
vector<string> items;
boost::split(items, line, boost::is_any_of(" -"));
- vector<pair<int, int> > alignment;
+ vector<pair<int, int>> alignment;
alignment.reserve(items.size() / 2);
for (size_t i = 1; i < items.size(); i += 2) {
alignment.push_back(make_pair(stoi(items[i - 1]), stoi(items[i])));
@@ -35,7 +35,7 @@ Alignment::Alignment() {}
Alignment::~Alignment() {}
-vector<pair<int, int> > Alignment::GetLinks(int sentence_index) const {
+vector<pair<int, int>> Alignment::GetLinks(int sentence_index) const {
return alignments[sentence_index];
}
@@ -43,7 +43,7 @@ void Alignment::WriteBinary(const fs::path& filepath) {
FILE* file = fopen(filepath.string().c_str(), "w");
int size = alignments.size();
fwrite(&size, sizeof(int), 1, file);
- for (vector<pair<int, int> > alignment: alignments) {
+ for (vector<pair<int, int>> alignment: alignments) {
size = alignment.size();
fwrite(&size, sizeof(int), 1, file);
fwrite(alignment.data(), sizeof(pair<int, int>), size, file);