aboutsummaryrefslogtreecommitdiff
path: root/absl/random
diff options
context:
space:
mode:
authorDerek Mauro <dmauro@google.com>2024-05-24 12:02:05 -0700
committerCopybara-Service <copybara-worker@google.com>2024-05-24 12:03:23 -0700
commit52bc669d0ee5d9d7f787cbf576e3733c2b28db9c (patch)
treecc05de66cd6a4795fa461f09a809e672365a3442 /absl/random
parent50d39219dc5a63f26d3871cfb3dbe198091eadad (diff)
downloadabseil-52bc669d0ee5d9d7f787cbf576e3733c2b28db9c.tar.gz
abseil-52bc669d0ee5d9d7f787cbf576e3733c2b28db9c.tar.bz2
abseil-52bc669d0ee5d9d7f787cbf576e3733c2b28db9c.zip
Workaround bogus GCC14 -Wmaybe-uninitialized warning
PiperOrigin-RevId: 636992927 Change-Id: I4da3be41a5961d0828eec7ac5c67b299a2e0f237
Diffstat (limited to 'absl/random')
-rw-r--r--absl/random/beta_distribution.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/absl/random/beta_distribution.h b/absl/random/beta_distribution.h
index c154066f..432c5161 100644
--- a/absl/random/beta_distribution.h
+++ b/absl/random/beta_distribution.h
@@ -181,18 +181,18 @@ class beta_distribution {
result_type alpha_;
result_type beta_;
- result_type a_; // the smaller of {alpha, beta}, or 1.0/alpha_ in JOEHNK
- result_type b_; // the larger of {alpha, beta}, or 1.0/beta_ in JOEHNK
- result_type x_; // alpha + beta, or the result in degenerate cases
- result_type log_x_; // log(x_)
- result_type y_; // "beta" in Cheng
- result_type gamma_; // "gamma" in Cheng
+ result_type a_{}; // the smaller of {alpha, beta}, or 1.0/alpha_ in JOEHNK
+ result_type b_{}; // the larger of {alpha, beta}, or 1.0/beta_ in JOEHNK
+ result_type x_{}; // alpha + beta, or the result in degenerate cases
+ result_type log_x_{}; // log(x_)
+ result_type y_{}; // "beta" in Cheng
+ result_type gamma_{}; // "gamma" in Cheng
- Method method_;
+ Method method_{};
// Placing this last for optimal alignment.
// Whether alpha_ != a_, i.e. true iff alpha_ > beta_.
- bool inverted_;
+ bool inverted_{};
static_assert(std::is_floating_point<RealType>::value,
"Class-template absl::beta_distribution<> must be "