summaryrefslogtreecommitdiff
blob: a0f6edda1eeddb4c9f216d3a6e6379f26d0d7a8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Fix C++14 compilation errors -- since C++11 make_pair<T1,T2> is resolved to
make_pair(T1&&, T2&&). Types should be deduced.

Bug: https://bugs.gentoo.org/594312

--- a/bact_classify.cpp
+++ b/bact_classify.cpp
@@ -86,7 +86,7 @@
 	if (id == -2) continue;
 	if (id != -1) {
 	  if (userule) 
-	    rules.insert (std::make_pair <std::string, double> (item, alpha[id]));
+	    rules.insert (std::make_pair(item, alpha[id]));
 	  result.push_back (id);
 	}
 	project (item, size+1, newdepth, l, new_trie_pos, new_str_pos);
@@ -138,7 +138,7 @@
        if (id == -2) continue;
        if (id >= 0) {
 	 if (userule) 
-	   rules.insert (std::make_pair <std::string, double> (tree[i].val.key(), alpha[id]));
+	   rules.insert (std::make_pair(tree[i].val.key(), alpha[id]));
 	 result.push_back (id);
        }
        project (tree[i].val.key(), 1, 0, i, 0, 0);
@@ -158,7 +158,7 @@
 
     for (std::map <std::string, double>::iterator it = rules.begin();
 	 it != rules.end(); ++it) 
-      tmp.push_back (std::make_pair <std::string, double> (it->first,  it->second));
+      tmp.push_back (std::make_pair(it->first,  it->second));
       
     std::sort (tmp.begin(), tmp.end(), pair_2nd_cmp<std::string, double>());
 
--- a/bact_mkmodel.cpp
+++ b/bact_mkmodel.cpp
@@ -111,7 +111,7 @@
    
   for (std::map<std::string, double>::iterator it = rules.begin(); it != rules.end(); ++it) {
     double a = it->second / alpha_sum;
-    ary2.push_back (std::make_pair <const char*, double>(it->first.c_str(), a));
+    ary2.push_back (std::make_pair(it->first.c_str(), a));
     ary.push_back  ((Darts::DoubleArray::key_type *)it->first.c_str());
     alpha.push_back (a);
   }
--- a/darts.h
+++ b/darts.h
@@ -394,10 +394,10 @@
     {
       if (! len) len = LengthFunc() (key);
 
-      register ArrayType  b = array[pos].base;
-      register ArrayUType p;
+      ArrayType  b = array[pos].base;
+      ArrayUType p;
 
-      for (register size_t i = 0; i < len; ++i) {
+      for (size_t i = 0; i < len; ++i) {
 	p = b + (NodeUType)(key[i]) + 1;
 	if ((ArrayUType)b == array[p].check) b = array[p].base;
 	else return -2;
@@ -414,8 +414,8 @@
     {
       if (! len) len = LengthFunc() (key);
 
-      register ArrayType  b = array[pos].base;
-      register ArrayUType p;       
+      ArrayType  b = array[pos].base;
+      ArrayUType p;       
 
       for (; pos2 < len; ++pos2) {
 	p = b + (NodeUType)(key[pos2]) + 1;
@@ -437,12 +437,12 @@
     {
       if (! len) len = LengthFunc() (key);
 
-      register ArrayType  b   = array[pos].base;
-      register size_t     num = 0;
-      register ArrayType  n;
-      register ArrayUType p;
+      ArrayType  b   = array[pos].base;
+      size_t     num = 0;
+      ArrayType  n;
+      ArrayUType p;
 
-      for (register size_t i = 0; i < len; ++i) {
+      for (size_t i = 0; i < len; ++i) {
 	p = b; // + 0;
 	n = array[p].base;
 	if ((ArrayUType) b == array[p].check && n < 0) result[num++] = -n-1;