aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/pluginConditionRandom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/pluginConditionRandom.cpp')
-rw-r--r--src/plugins/pluginConditionRandom.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/plugins/pluginConditionRandom.cpp b/src/plugins/pluginConditionRandom.cpp
index 42a4e00..facd201 100644
--- a/src/plugins/pluginConditionRandom.cpp
+++ b/src/plugins/pluginConditionRandom.cpp
@@ -4,28 +4,28 @@
4class ConditionRandom : public Condition 4class ConditionRandom : public Condition
5{ 5{
6public: 6public:
7 ConditionRandom() 7 ConditionRandom()
8 { 8 {
9 } 9 }
10 10
11 virtual ~ConditionRandom() 11 virtual ~ConditionRandom()
12 { 12 {
13 } 13 }
14 14
15 virtual bool shouldExec( class Runner &, class Target & ) 15 virtual bool shouldExec( class Runner &, class Target & )
16 { 16 {
17 if( (random()/(double)RAND_MAX) >= .5 ) 17 if( (random()/(double)RAND_MAX) >= .5 )
18 return true; 18 return true;
19 return false; 19 return false;
20 } 20 }
21 21
22 virtual Condition *clone() 22 virtual Condition *clone()
23 { 23 {
24 return new ConditionRandom(); 24 return new ConditionRandom();
25 } 25 }
26}; 26};
27 27
28#include <bu/plugger.h> 28#include <bu/plugger.h>
29PluginInterface3( pluginConditionRandom, random, ConditionRandom, Condition, 29PluginInterface3( pluginConditionRandom, random, ConditionRandom, Condition,
30 "Mike Buland", 0, 1 ); 30 "Mike Buland", 0, 1 );
31 31