summaryrefslogtreecommitdiffhomepage
path: root/contrib/Opcode/Ice/IceRandom.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-03-12 22:07:03 +0100
committerAki <please@ignore.pl>2024-03-12 22:07:36 +0100
commit81bb6873f1c0291fecbf6e429ad15ac3db66a4c0 (patch)
treefd7552ecabeeffb45a1fbe3730ab62bc7a64dd85 /contrib/Opcode/Ice/IceRandom.cpp
parentf43d32d6d2cc7ecd04f4f06f20d5a6fc2c87c9ae (diff)
downloadstarshatter-81bb6873f1c0291fecbf6e429ad15ac3db66a4c0.zip
starshatter-81bb6873f1c0291fecbf6e429ad15ac3db66a4c0.tar.gz
starshatter-81bb6873f1c0291fecbf6e429ad15ac3db66a4c0.tar.bz2
Legal notices updated
Rename contrib -> third-party intendes to express the origin and purpose of that part of the code better. I plan to readd contrib/ again but with more in-project things like bash-completions, dev workflow scripts etc.
Diffstat (limited to 'contrib/Opcode/Ice/IceRandom.cpp')
-rw-r--r--contrib/Opcode/Ice/IceRandom.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/contrib/Opcode/Ice/IceRandom.cpp b/contrib/Opcode/Ice/IceRandom.cpp
deleted file mode 100644
index 305721d..0000000
--- a/contrib/Opcode/Ice/IceRandom.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Contains code for random generators.
- * \file IceRandom.cpp
- * \author Pierre Terdiman
- * \date August, 9, 2001
- */
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Precompiled Header
-#include "StdAfx.h"
-
-using namespace IceCore;
-
-void IceCore:: SRand(udword seed)
-{
- srand(seed);
-}
-
-udword IceCore::Rand()
-{
- return rand();
-}
-
-
-static BasicRandom gRandomGenerator(42);
-
-udword IceCore::GetRandomIndex(udword max_index)
-{
- // We don't use rand() since it's limited to RAND_MAX
- udword Index = gRandomGenerator.Randomize();
- return Index % max_index;
-}
-