فهرست منبع

Fix -Wc++11-extensions warning after #26737

Fixes #26769.
Rémi Verschelde 6 سال پیش
والد
کامیت
bce56cf337
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 2 1
      core/math/random_pcg.cpp
  2. 1 1
      core/math/random_pcg.h

+ 2 - 1
core/math/random_pcg.cpp

@@ -33,7 +33,8 @@
 #include "core/os/os.h"
 
 RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
-		pcg() {
+		pcg(),
+		current_seed(DEFAULT_SEED) {
 	pcg.inc = p_inc;
 	seed(p_seed);
 }

+ 1 - 1
core/math/random_pcg.h

@@ -37,7 +37,7 @@
 
 class RandomPCG {
 	pcg32_random_t pcg;
-	uint64_t current_seed = DEFAULT_SEED; // seed with this to get the same state
+	uint64_t current_seed; // seed with this to get the same state
 
 public:
 	static const uint64_t DEFAULT_SEED = 12047754176567800795U;