fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / boost / boost.random.Wshadow.warnings.patch
blob17c0f5995fc4b557e4d1c23889c0aeeaf6135b7d
1 --- misc/boost_1_44_0/boost/random/mersenne_twister.hpp
2 +++ misc/build/boost_1_44_0/boost/random/mersenne_twister.hpp
3 @@ -195,19 +195,19 @@
4 * Returns true if the two generators are in the same state,
5 * and will thus produce identical sequences.
6 */
7 - friend bool operator==(const mersenne_twister_engine& x,
8 - const mersenne_twister_engine& y)
9 + friend bool operator==(const mersenne_twister_engine& x_arg,
10 + const mersenne_twister_engine& y_arg)
12 - if(x.i < y.i) return x.equal_imp(y);
13 - else return y.equal_imp(x);
14 + if(x_arg.i < y_arg.i) return x_arg.equal_imp(y_arg);
15 + else return y_arg.equal_imp(x_arg);
18 /**
19 * Returns true if the two generators are in different states.
21 - friend bool operator!=(const mersenne_twister_engine& x,
22 - const mersenne_twister_engine& y)
23 - { return !(x == y); }
24 + friend bool operator!=(const mersenne_twister_engine& x_arg,
25 + const mersenne_twister_engine& y_arg)
26 + { return !(x_arg == y_arg); }
28 private:
29 /// \cond show_private
30 --- foo/foo/foo/boost/random/binomial_distribution.hpp
31 +++ foo/foo/foo/boost/random/binomial_distribution.hpp
32 @@ -272,21 +272,21 @@
33 using std::sqrt;
34 using std::pow;
36 - RealType p = (0.5 < _p)? (1 - _p) : _p;
37 - IntType t = _t;
38 + RealType p_lcl = (0.5 < _p)? (1 - _p) : _p;
39 + IntType t_lcl = _t;
41 - m = static_cast<IntType>((t+1)*p);
42 + m = static_cast<IntType>((t_lcl+1)*p_lcl);
44 if(use_inversion()) {
45 - q_n = pow((1 - p), static_cast<RealType>(t));
46 + q_n = pow((1 - p_lcl), static_cast<RealType>(t_lcl));
47 } else {
48 - btrd.r = p/(1-p);
49 - btrd.nr = (t+1)*btrd.r;
50 - btrd.npq = t*p*(1-p);
51 + btrd.r = p_lcl/(1-p_lcl);
52 + btrd.nr = (t_lcl+1)*btrd.r;
53 + btrd.npq = t_lcl*p_lcl*(1-p_lcl);
54 RealType sqrt_npq = sqrt(btrd.npq);
55 btrd.b = 1.15 + 2.53 * sqrt_npq;
56 - btrd.a = -0.0873 + 0.0248*btrd.b + 0.01*p;
57 - btrd.c = t*p + 0.5;
58 + btrd.a = -0.0873 + 0.0248*btrd.b + 0.01*p_lcl;
59 + btrd.c = t_lcl*p_lcl + 0.5;
60 btrd.alpha = (2.83 + 5.1/btrd.b) * sqrt_npq;
61 btrd.v_r = 0.92 - 4.2/btrd.b;
62 btrd.u_rv_r = 0.86*btrd.v_r;
63 @@ -304,9 +304,9 @@
64 RealType u;
65 RealType v = uniform_01<RealType>()(urng);
66 if(v <= btrd.u_rv_r) {
67 - RealType u = v/btrd.v_r - 0.43;
68 + RealType u_lcl = v/btrd.v_r - 0.43;
69 return static_cast<IntType>(floor(
70 - (2*btrd.a/(0.5 - abs(u)) + btrd.b)*u + btrd.c));
71 + (2*btrd.a/(0.5 - abs(u_lcl)) + btrd.b)*u_lcl + btrd.c));
74 if(v >= btrd.v_r) {
75 @@ -344,9 +344,9 @@
76 v = log(v);
77 RealType rho =
78 (km/btrd.npq)*(((km/3. + 0.625)*km + 1./6)/btrd.npq + 0.5);
79 - RealType t = -km*km/(2*btrd.npq);
80 - if(v < t - rho) return k;
81 - if(v > t + rho) continue;
82 + RealType t_lcl = -km*km/(2*btrd.npq);
83 + if(v < t_lcl - rho) return k;
84 + if(v > t_lcl + rho) continue;
86 IntType nm = _t - m + 1;
87 RealType h = (m + 0.5)*log((m + 1)/(btrd.r*nm))
88 @@ -367,11 +367,11 @@
91 template<class URNG>
92 - IntType invert(IntType t, RealType p, URNG& urng) const
93 + IntType invert(IntType t_arg, RealType p_arg, URNG& urng) const
95 - RealType q = 1 - p;
96 - RealType s = p / q;
97 - RealType a = (t + 1) * s;
98 + RealType q = 1 - p_arg;
99 + RealType s = p_arg / q;
100 + RealType a = (t_arg + 1) * s;
101 RealType r = q_n;
102 RealType u = uniform_01<RealType>()(urng);
103 IntType x = 0;
104 --- foo/foo/foo/boost/random/geometric_distribution.hpp
105 +++ foo/foo/foo/boost/random/geometric_distribution.hpp
106 @@ -104,8 +104,8 @@
108 * Requires: 0 < p < 1
110 - explicit geometric_distribution(const RealType& p = RealType(0.5))
111 - : _p(p)
112 + explicit geometric_distribution(const RealType& p_arg = RealType(0.5))
113 + : _p(p_arg)
115 BOOST_ASSERT(RealType(0) < _p && _p < RealType(1));
116 init();
117 --- foo/foo/foo/boost/random/shuffle_order.hpp
118 +++ foo/foo/foo/boost/random/shuffle_order.hpp
119 @@ -200,8 +200,8 @@
122 /** Returns true if the two generators will produce identical sequences. */
123 - BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(shuffle_order_engine, x, y)
124 - { return x._rng == y._rng && x.y == y.y && std::equal(x.v, x.v+k, y.v); }
125 + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(shuffle_order_engine, x, y_arg)
126 + { return x._rng == y_arg._rng && x.y == y_arg.y && std::equal(x.v, x.v+k, y_arg.v); }
127 /** Returns true if the two generators will produce different sequences. */
128 BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(shuffle_order_engine)
130 --- foo/foo/foo/boost/random/subtract_with_carry.hpp
131 +++ foo/foo/foo/boost/random/subtract_with_carry.hpp
132 @@ -249,10 +249,10 @@
133 * Returns true if the two generators will produce identical
134 * sequences of values.
136 - BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_engine, x, y)
137 + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_engine, x_arg, y_arg)
139 for(unsigned int j = 0; j < r; ++j)
140 - if(x.compute(j) != y.compute(j))
141 + if(x_arg.compute(j) != y_arg.compute(j))
142 return false;
143 return true;
145 @@ -268,21 +268,21 @@
147 friend struct detail::subtract_with_carry_discard;
149 - IntType do_update(std::size_t current, std::size_t short_index, IntType carry)
150 + IntType do_update(std::size_t current, std::size_t short_index, IntType carry_arg)
152 IntType delta;
153 - IntType temp = x[current] + carry;
154 + IntType temp = x[current] + carry_arg;
155 if (x[short_index] >= temp) {
156 // x(n) >= 0
157 delta = x[short_index] - temp;
158 - carry = 0;
159 + carry_arg = 0;
160 } else {
161 // x(n) < 0
162 delta = modulus - temp + x[short_index];
163 - carry = 1;
164 + carry_arg = 1;
166 x[current] = delta;
167 - return carry;
168 + return carry_arg;
170 /// \endcond
172 @@ -483,10 +483,10 @@
175 /** Returns true if the two generators will produce identical sequences. */
176 - BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_01_engine, x, y)
177 + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_01_engine, x_arg, y_arg)
179 for(unsigned int j = 0; j < r; ++j)
180 - if(x.compute(j) != y.compute(j))
181 + if(x_arg.compute(j) != y_arg.compute(j))
182 return false;
183 return true;
185 @@ -498,17 +498,17 @@
187 friend struct detail::subtract_with_carry_discard;
189 - RealType do_update(std::size_t current, std::size_t short_index, RealType carry)
190 + RealType do_update(std::size_t current, std::size_t short_index, RealType carry_arg)
192 - RealType delta = x[short_index] - x[current] - carry;
193 + RealType delta = x[short_index] - x[current] - carry_arg;
194 if(delta < 0) {
195 delta += RealType(1);
196 - carry = RealType(1)/_modulus;
197 + carry_arg = RealType(1)/_modulus;
198 } else {
199 - carry = 0;
200 + carry_arg = 0;
202 x[current] = delta;
203 - return carry;
204 + return carry_arg;
206 /// \endcond
207 std::size_t k;
208 --- misc/boost_1_44_0/boost/random/lagged_fibonacci.hpp
209 +++ misc/build/boost_1_44_0/boost/random/lagged_fibonacci.hpp
210 @@ -148,8 +148,8 @@
211 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, lagged_fibonacci_engine, f)
213 os << f.i;
214 - for(unsigned int i = 0; i < f.long_lag; ++i)
215 - os << ' ' << f.x[i];
216 + for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index)
217 + os << ' ' << f.x[i_index];
218 return os;
221 @@ -159,17 +159,17 @@
222 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, lagged_fibonacci_engine, f)
224 is >> f.i >> std::ws;
225 - for(unsigned int i = 0; i < f.long_lag; ++i)
226 - is >> f.x[i] >> std::ws;
227 + for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index)
228 + is >> f.x[i_index] >> std::ws;
229 return is;
233 * Returns true if the two generators will produce identical
234 * sequences of outputs.
236 - BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_engine, x, y)
237 - { return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); }
238 + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_engine, x_arg, y_arg)
239 + { return x_arg.i == y_arg.i && std::equal(x_arg.x, x_arg.x+long_lag, y_arg.x); }
242 * Returns true if the two generators will produce different
243 @@ -359,8 +359,8 @@
244 using std::pow;
245 os << f.i;
246 std::ios_base::fmtflags oldflags = os.flags(os.dec | os.fixed | os.left);
247 - for(unsigned int i = 0; i < f.long_lag; ++i)
248 - os << ' ' << f.x[i] * f.modulus();
249 + for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index)
250 + os << ' ' << f.x[i_index] * f.modulus();
251 os.flags(oldflags);
252 return os;
254 @@ -371,10 +371,10 @@
255 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, lagged_fibonacci_01_engine, f)
257 is >> f.i;
258 - for(unsigned int i = 0; i < f.long_lag; ++i) {
259 + for(unsigned int i_index = 0; i_index < f.long_lag; ++i_index) {
260 typename lagged_fibonacci_01_engine::result_type value;
261 is >> std::ws >> value;
262 - f.x[i] = value / f.modulus();
263 + f.x[i_index] = value / f.modulus();
265 return is;
267 @@ -383,8 +383,8 @@
268 * Returns true if the two generators will produce identical
269 * sequences of outputs.
271 - BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_01_engine, x, y)
272 - { return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); }
273 + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_01_engine, x_arg, y_arg)
274 + { return x_arg.i == y_arg.i && std::equal(x_arg.x, x_arg.x+long_lag, y_arg.x); }
277 * Returns true if the two generators will produce different