summaryrefslogtreecommitdiff
path: root/extractor/alignment.cc
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-06-20 01:28:43 +0200
committerPatrick Simianer <p@simianer.de>2013-06-20 01:28:43 +0200
commit64fc39f97b62d9575eeb8da8067b1b09b71c0f84 (patch)
tree7475ae5578f40d3deabeef4532e3a81e2c662ad5 /extractor/alignment.cc
parent3b9f1972dd2c0874c5845b68f9bd7f955b6d67eb (diff)
parent0dc7755f7fb1ef15db5a60c70866aa61b6367898 (diff)
Merge remote-tracking branch 'upstream/master'
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 1aea34b3..b187c03a 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 = 0; i < items.size(); i += 2) {
alignment.push_back(make_pair(stoi(items[i]), stoi(items[i + 1])));
@@ -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);