diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-01-03 23:37:48 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-01-03 23:37:48 -0700 |
commit | 4d0ae6422674a2a752c5c6b60ca5ffe908a2278f (patch) | |
tree | 99c8ad829646a6da9c74ded9921f27baa572e68e | |
parent | fcd30be44982cfe79ed777b19b2543fe3e72e239 (diff) | |
download | stage-4d0ae6422674a2a752c5c6b60ca5ffe908a2278f.tar.gz stage-4d0ae6422674a2a752c5c6b60ca5ffe908a2278f.tar.bz2 stage-4d0ae6422674a2a752c5c6b60ca5ffe908a2278f.tar.xz stage-4d0ae6422674a2a752c5c6b60ca5ffe908a2278f.zip |
Random numbers are better, and win32 compatible.
-rw-r--r-- | src/functionrandom.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/functionrandom.cpp b/src/functionrandom.cpp index ec302b3..5599310 100644 --- a/src/functionrandom.cpp +++ b/src/functionrandom.cpp | |||
@@ -4,6 +4,10 @@ | |||
4 | 4 | ||
5 | #include <stdlib.h> | 5 | #include <stdlib.h> |
6 | 6 | ||
7 | #ifdef WIN32 | ||
8 | #define random() rand() | ||
9 | #endif | ||
10 | |||
7 | FunctionRandom::FunctionRandom() | 11 | FunctionRandom::FunctionRandom() |
8 | { | 12 | { |
9 | } | 13 | } |
diff --git a/src/main.cpp b/src/main.cpp index 1f532d9..5b91861 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -6,6 +6,10 @@ | |||
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <time.h> | 7 | #include <time.h> |
8 | 8 | ||
9 | #ifdef WIN32 | ||
10 | #define srandom( x ) srand( x ) | ||
11 | #endif | ||
12 | |||
9 | #include <bu/sio.h> | 13 | #include <bu/sio.h> |
10 | using namespace Bu; | 14 | using namespace Bu; |
11 | 15 | ||