Browse code
srand
Greg Wiley authored on 04/05/2017 18:18:54
Showing 2 changed files
Showing 2 changed files
... | ... |
@@ -17,6 +17,8 @@ |
17 | 17 |
class stdlib_ifc |
18 | 18 |
{ |
19 | 19 |
public: |
20 |
+ virtual void srand(unsigned int seed) const { |
|
21 |
+ } |
|
20 | 22 |
virtual int rand() const |
21 | 23 |
{ |
22 | 24 |
return 0; |
... | ... |
@@ -32,6 +34,9 @@ private: |
32 | 34 |
public: |
33 | 35 |
stdlib (delegate delegate = std::make_shared<stdlib_ifc>()) : delegate_ |
34 | 36 |
(delegate) {} |
37 |
+ void srand(unsigned int seed) const { |
|
38 |
+ return delegate_->srand(seed); |
|
39 |
+ } |
|
35 | 40 |
int rand() const |
36 | 41 |
{ |
37 | 42 |
return delegate_->rand(); |