summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-08 20:47:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-09 10:33:59 +0100
commitcc0e9a37de8bceeb224b03a5bb1827b087e3e7b5 (patch)
tree8d24abeda6b70096c7f96107b681a81fe6378418 /basic
parent0eb52534de536fbe33585c91f4f173653b184e24 (diff)
cppcheck: variableScope
Change-Id: If0c56c89e2722d47a401363f3854331229856490
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/methods.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 5a86549402a8..6ecdf30e1361 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3560,10 +3560,9 @@ RTLFUNC(Randomize)
{
StarBASIC::Error( SbERR_BAD_ARGUMENT );
}
- int nSeed;
if( rPar.Count() == 2 )
{
- nSeed = (int)rPar.Get(1)->GetInteger();
+ int nSeed = (int)rPar.Get(1)->GetInteger();
theRandomNumberGenerator::get().global_rng.seed(nSeed);
}
// without parameter, no need to do anything - RNG is seeded at first use