Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
d875cbac
Commit
d875cbac
authored
Jun 06, 2014
by
Lynn Garren
Browse files
use explicit 32bit mask to avoid compiler warnings
parent
da9ad594
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d875cbac
2014-06-06 Lynn Garren <garren@fnal.gov>
* Random/src/RanshiEngine.cc: use explicit 32bit mask to avoid compiler warnings
* Random/src/MTwistEngine.cc: make sure we don't go past the end of the
array in MTwistEngine::showStatus
...
...
Random/ChangeLog
View file @
d875cbac
2014-06-06 Lynn Garren <garren@fnal.gov>
* src/RanshiEngine.cc: use explicit 32bit mask to avoid compiler warnings
* src/MTwistEngine.cc: make sure we don't go past the end of the
array in MTwistEngine::showStatus
...
...
Random/src/RanshiEngine.cc
View file @
d875cbac
...
...
@@ -29,6 +29,7 @@
// M. Fischler - split get() into tag validation and
// getState() for anonymous restores 12/27/04
// M. Fischler - State-saving using only ints, for portability 4/12/05
// L. Garren - use explicit 32bit mask to avoid compiler warnings 6/6/2014
//
// =======================================================================
...
...
@@ -36,6 +37,7 @@
#include
"CLHEP/Random/RanshiEngine.h"
#include
"CLHEP/Random/engineIDulong.h"
#include
<string.h>
// for strcmp
#include
<iostream>
namespace
CLHEP
{
...
...
@@ -52,7 +54,7 @@ RanshiEngine::RanshiEngine()
{
int
i
=
0
;
while
(
i
<
numBuff
)
{
buffer
[
i
]
=
(
unsigned
int
)(
numEngines
+
19780503L
*
(
i
+
1
));
buffer
[
i
]
=
(
unsigned
int
)(
(
numEngines
+
19780503L
*
(
i
+
1
))
&
0xffffffff
)
;
++
i
;
}
theSeed
=
numEngines
+
19780503L
*++
i
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment