forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.6.10-gcc.patch
142 lines (136 loc) · 3.76 KB
/
1.6.10-gcc.patch
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 68cf1d2..16a3c94 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -806,7 +806,7 @@ support::FileNameList const &
tmp->setParent(&buffer);
return cache;
}
- static support::FileNameList const empty;
+ static support::FileNameList const empty = support::FileNameList();
return empty;
}
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 4a267e9..7a165e2 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -188,62 +188,6 @@ TabularFeature tabularFeature[] =
};
-template <class T>
-string const write_attribute(string const & name, T const & t)
-{
- string const s = tostr(t);
- return s.empty() ? s : " " + name + "=\"" + s + "\"";
-}
-
-template <>
-string const write_attribute(string const & name, string const & t)
-{
- return t.empty() ? t : " " + name + "=\"" + t + "\"";
-}
-
-
-template <>
-string const write_attribute(string const & name, docstring const & t)
-{
- return t.empty() ? string() : " " + name + "=\"" + to_utf8(t) + "\"";
-}
-
-
-template <>
-string const write_attribute(string const & name, bool const & b)
-{
- // we write only true attribute values so we remove a bit of the
- // file format bloat for tabulars.
- return b ? write_attribute(name, convert<string>(b)) : string();
-}
-
-
-template <>
-string const write_attribute(string const & name, int const & i)
-{
- // we write only true attribute values so we remove a bit of the
- // file format bloat for tabulars.
- return i ? write_attribute(name, convert<string>(i)) : string();
-}
-
-
-template <>
-string const write_attribute(string const & name, Tabular::idx_type const & i)
-{
- // we write only true attribute values so we remove a bit of the
- // file format bloat for tabulars.
- return i ? write_attribute(name, convert<string>(i)) : string();
-}
-
-
-template <>
-string const write_attribute(string const & name, Length const & value)
-{
- // we write only the value if we really have one same reson as above.
- return value.zero() ? string() : write_attribute(name, value.asString());
-}
-
-
string const tostr(LyXAlignment const & num)
{
switch (num) {
@@ -503,6 +447,61 @@ void l_getline(istream & is, string & str)
}
}
+template <class T>
+string const write_attribute(string const & name, T const & t)
+{
+ string const s = tostr(t);
+ return s.empty() ? s : " " + name + "=\"" + s + "\"";
+}
+
+template <>
+string const write_attribute(string const & name, string const & t)
+{
+ return t.empty() ? t : " " + name + "=\"" + t + "\"";
+}
+
+
+template <>
+string const write_attribute(string const & name, docstring const & t)
+{
+ return t.empty() ? string() : " " + name + "=\"" + to_utf8(t) + "\"";
+}
+
+
+template <>
+string const write_attribute(string const & name, bool const & b)
+{
+ // we write only true attribute values so we remove a bit of the
+ // file format bloat for tabulars.
+ return b ? write_attribute(name, convert<string>(b)) : string();
+}
+
+
+template <>
+string const write_attribute(string const & name, int const & i)
+{
+ // we write only true attribute values so we remove a bit of the
+ // file format bloat for tabulars.
+ return i ? write_attribute(name, convert<string>(i)) : string();
+}
+
+
+template <>
+string const write_attribute(string const & name, Tabular::idx_type const & i)
+{
+ // we write only true attribute values so we remove a bit of the
+ // file format bloat for tabulars.
+ return i ? write_attribute(name, convert<string>(i)) : string();
+}
+
+
+template <>
+string const write_attribute(string const & name, Length const & value)
+{
+ // we write only the value if we really have one same reson as above.
+ return value.zero() ? string() : write_attribute(name, value.asString());
+}
+
} // namespace