@@ -132,8 +132,9 @@ std::basic_ostream<CharT, Traits>&
132132 if (desired_width > 16 ) {
133133 out.width (desired_width - 16 );
134134 }
135- if (highpart != 0 || desired_width > 16 )
135+ if (highpart != 0 || desired_width > 16 ) {
136136 out << highpart;
137+ }
137138 CharT oldfill = ' \0 ' ;
138139 if (highpart != 0 ) {
139140 out.width (16 );
@@ -168,17 +169,19 @@ std::basic_istream<CharT, Traits>&
168169{
169170 typename std::basic_istream<CharT, Traits>::sentry s (in);
170171
171- if (!s)
172+ if (!s) {
172173 return in;
174+ }
173175
174176 constexpr auto BASE = pcg128_t (10ULL );
175177 pcg128_t current (0ULL );
176178 bool did_nothing = true ;
177179 bool overflow = false ;
178180 for (;;) {
179181 CharT wide_ch = in.get ();
180- if (!in.good ())
182+ if (!in.good ()) {
181183 break ;
184+ }
182185 auto ch = in.narrow (wide_ch, ' \0 ' );
183186 if (ch < ' 0' || ch > ' 9' ) {
184187 in.unget ();
@@ -194,8 +197,9 @@ std::basic_istream<CharT, Traits>&
194197
195198 if (did_nothing || overflow) {
196199 in.setstate (std::ios::failbit);
197- if (overflow)
200+ if (overflow) {
198201 current = ~pcg128_t (0ULL );
202+ }
199203 }
200204
201205 value = current;
@@ -223,8 +227,9 @@ std::basic_istream<CharT, Traits>&
223227{
224228 uint32_t value = 0xdecea5edU ;
225229 in >> value;
226- if (!in && value == 0xdecea5edU )
230+ if (!in && value == 0xdecea5edU ) {
227231 return in;
232+ }
228233 if (value > uint8_t (~0 )) {
229234 in.setstate (std::ios::failbit);
230235 value = ~0U ;
@@ -425,10 +430,11 @@ SrcIter uneven_copy_impl(
425430 src_t value = 0 ;
426431
427432 while (dest_first != dest_last) {
428- if ((count++ % SCALE) == 0 )
433+ if ((count++ % SCALE) == 0 ) {
429434 value = *src_first++; // Get more bits
430- else
435+ } else {
431436 value >>= DEST_BITS; // Move down bits
437+ }
432438
433439 *dest_first++ = dest_t (value); // Truncates, ignores high bits.
434440 }
@@ -549,8 +555,9 @@ auto bounded_rand(RngType& rng, typename RngType::result_type upper_bound)
549555 rtype threshold = (RngType::max () - RngType::min () + rtype (1 ) - upper_bound) % upper_bound;
550556 for (;;) {
551557 rtype r = rng () - RngType::min ();
552- if (r >= threshold)
558+ if (r >= threshold) {
553559 return r % upper_bound;
560+ }
554561 }
555562}
556563
@@ -599,8 +606,9 @@ class seed_seq_from
599606 template <typename Iter>
600607 void generate (Iter start, Iter finish)
601608 {
602- for (auto i = start; i != finish; ++i)
609+ for (auto i = start; i != finish; ++i) {
603610 *i = result_type (rng_ ());
611+ }
604612 }
605613
606614 constexpr size_t size () const
@@ -654,11 +662,13 @@ std::ostream& operator<<(std::ostream& out, printable_typename<T>)
654662 int status;
655663 char * pretty_name =
656664 abi::__cxa_demangle (implementation_typename, nullptr , nullptr , &status);
657- if (status == 0 )
665+ if (status == 0 ) {
658666 out << pretty_name;
667+ }
659668 free (static_cast <void *>(pretty_name));
660- if (status == 0 )
669+ if (status == 0 ) {
661670 return out;
671+ }
662672#endif
663673 out << implementation_typename;
664674 return out;
0 commit comments