aboutsummaryrefslogtreecommitdiff
path: root/science/crf++
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-09-01 10:29:11 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-09-01 10:29:11 +0000
commit224f5e1ab3aea773440c00c3996b3638cc8455cb (patch)
tree8d3630ccc9881c3205ccfecbdf3d7dd1f09c21f3 /science/crf++
parent22fb65b135e0900ba4ab0246346a03c859c2baee (diff)
downloadports-224f5e1ab3aea773440c00c3996b3638cc8455cb.tar.gz
ports-224f5e1ab3aea773440c00c3996b3638cc8455cb.zip
science/crf++: Fix build with Clang 6
feature_index.cpp:174:22: error: no matching function for call to 'make_pair' old2new.insert(std::make_pair<int, int>(it->second.first, new_maxid)); ^~~~~~~~~~~~~~~~~~~~~~~~ http://beefy11.nyi.freebsd.org/data/head-i386-default/p478276_s338342/logs/errors/crf++-0.54_1.log
Notes
Notes: svn path=/head/; revision=478668
Diffstat (limited to 'science/crf++')
-rw-r--r--science/crf++/files/patch-feature__index.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/science/crf++/files/patch-feature__index.cpp b/science/crf++/files/patch-feature__index.cpp
new file mode 100644
index 000000000000..042fafa6d42a
--- /dev/null
+++ b/science/crf++/files/patch-feature__index.cpp
@@ -0,0 +1,21 @@
+--- feature_index.cpp.orig 2018-09-01 10:26:57 UTC
++++ feature_index.cpp
+@@ -34,8 +34,7 @@ int EncoderFeatureIndex::getID(const char *key) {
+ std::map <std::string, std::pair<int, unsigned int> >::iterator
+ it = dic_.find(key);
+ if (it == dic_.end()) {
+- dic_.insert(std::make_pair<std::string, std::pair<int, unsigned int> >
+- (key, std::make_pair<int, unsigned int>(maxid_, 1)));
++ dic_.insert(std::make_pair(key, std::make_pair(maxid_, 1)));
+ int n = maxid_;
+ maxid_ += (key[0] == 'U' ? y_.size() : y_.size() * y_.size());
+ return n;
+@@ -171,7 +170,7 @@ void EncoderFeatureIndex::shrink(size_t freq) {
+ const std::string &key = it->first;
+
+ if (it->second.second >= freq) {
+- old2new.insert(std::make_pair<int, int>(it->second.first, new_maxid));
++ old2new.insert(std::make_pair(it->second.first, new_maxid));
+ it->second.first = new_maxid;
+ new_maxid += (key[0] == 'U' ? y_.size() : y_.size() * y_.size());
+ ++it;