From a06edbf12ad26742124d9d445d790b80e25c8538 Mon Sep 17 00:00:00 2001 From: michelou Date: Wed, 25 Jul 2007 17:10:26 +0000 Subject: minor change (msil) --- src/dotnet-library/scala/Random.scala | 2 +- src/dotnet-library/scala/compat/Platform.scala | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/dotnet-library') diff --git a/src/dotnet-library/scala/Random.scala b/src/dotnet-library/scala/Random.scala index 45e3d6619d..2df7cb5eb2 100644 --- a/src/dotnet-library/scala/Random.scala +++ b/src/dotnet-library/scala/Random.scala @@ -25,7 +25,7 @@ class Random(self0: System.Random) { def this(seed: Int) = this(new System.Random(seed)) /** Creates a new random number generator. */ - def this() = this(Math.abs(System.Environment.TickCount)) + def this() = this(new System.Random(System.Environment.TickCount)) /** Returns the next pseudorandom, uniformly distributed boolean value * from this random number generator's sequence. diff --git a/src/dotnet-library/scala/compat/Platform.scala b/src/dotnet-library/scala/compat/Platform.scala index 8b31b52539..7d5ec48b67 100644 --- a/src/dotnet-library/scala/compat/Platform.scala +++ b/src/dotnet-library/scala/compat/Platform.scala @@ -26,7 +26,7 @@ object Platform { * @param destPos .. * @param length .. */ - def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int): Unit = { + def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int) { if (!src.isInstanceOf[System.Array]) throw new Exception("src for arraycopy is not an Array; use scala.Array.copy for boxed arrays"); if (!dest.isInstanceOf[System.Array]) throw new Exception("dest for arraycopy is not an Array; use scala.Array.copy for boxed arrays"); System.Array.Copy(src.asInstanceOf[System.Array], srcPos, dest.asInstanceOf[System.Array], destPos, length) @@ -40,9 +40,11 @@ object Platform { * @return .. */ def createArray(elemClass: Class, length: Int): AnyRef = - System.Array.CreateInstance(elemClass, length); + System.Array.CreateInstance(elemClass, length) - def arrayclear(arr: Array[Int]): Unit = System.Array.Clear(arr.asInstanceOf[System.Array], 0, arr.length) + def arrayclear(arr: Array[Int]) { + System.Array.Clear(arr.asInstanceOf[System.Array], 0, arr.length) + } def getClassForName(name: String): Class = System.Type.GetType(name) @@ -50,7 +52,7 @@ object Platform { def currentTime: Long = 0L - def collectGarbage: Unit = System.GC.Collect() + def collectGarbage { System.GC.Collect() } } -- cgit v1.2.3