From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Tue, 3 Jul 2007 14:37:29 +0000
Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some
licensing info
---
.../Properties/AssemblyInfo.cs | 2 -
.../Region/Terrain.BasicTerrain/TerrainEngine.cs | 49 +++++++++++-----------
.../Region/Terrain.BasicTerrain/TerrainFilter.cs | 8 +---
3 files changed, 27 insertions(+), 32 deletions(-)
(limited to 'OpenSim/Region/Terrain.BasicTerrain')
diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
index 7d10ae3..9c721d1 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
@@ -26,9 +26,7 @@
*
*/
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 0f450c3..6c9ec26 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -27,8 +27,9 @@
*/
using System;
using System.Collections.Generic;
-using System.Text;
using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
using libTerrain;
using OpenJPEGNet;
@@ -421,9 +422,9 @@ namespace OpenSim.Region.Terrain
/// The filename of the double array to import
public void loadFromFileF64(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read);
- System.IO.BinaryReader bs = new System.IO.BinaryReader(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.Open, FileAccess.Read);
+ BinaryReader bs = new BinaryReader(s);
int x, y;
for (x = 0; x < w; x++)
{
@@ -446,9 +447,9 @@ namespace OpenSim.Region.Terrain
/// The filename of the float array to import
public void loadFromFileF32(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read);
- System.IO.BinaryReader bs = new System.IO.BinaryReader(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.Open, FileAccess.Read);
+ BinaryReader bs = new BinaryReader(s);
int x, y;
for (x = 0; x < w; x++)
{
@@ -471,9 +472,9 @@ namespace OpenSim.Region.Terrain
/// A path to the .RAW format
public void loadFromFileSLRAW(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read);
- System.IO.BinaryReader bs = new System.IO.BinaryReader(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.Open, FileAccess.Read);
+ BinaryReader bs = new BinaryReader(s);
int x, y;
for (x = 0; x < w; x++)
{
@@ -496,9 +497,9 @@ namespace OpenSim.Region.Terrain
/// The desired output filename
public void writeToFileF64(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write);
- System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
+ BinaryWriter bs = new BinaryWriter(s);
int x, y;
for (x = 0; x < w; x++)
@@ -519,9 +520,9 @@ namespace OpenSim.Region.Terrain
/// The desired output filename
public void writeToFileF32(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write);
- System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
+ BinaryWriter bs = new BinaryWriter(s);
int x, y;
for (x = 0; x < w; x++)
@@ -543,9 +544,9 @@ namespace OpenSim.Region.Terrain
/// Filename to write to
public void writeToFileRAW(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write);
- System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
+ BinaryWriter bs = new BinaryWriter(s);
int x, y;
@@ -608,9 +609,9 @@ namespace OpenSim.Region.Terrain
/// The filename to output to
public void writeToFileHiRAW(string filename)
{
- System.IO.FileInfo file = new System.IO.FileInfo(filename);
- System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write);
- System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s);
+ FileInfo file = new FileInfo(filename);
+ FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
+ BinaryWriter bs = new BinaryWriter(s);
// Generate a smegging big lookup table to speed the operation up (it needs it)
double[] lookupTable = new double[65536];
@@ -872,7 +873,7 @@ namespace OpenSim.Region.Terrain
}
}
- bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
+ bmp.Save(filename, ImageFormat.Png);
}
catch (Exception e)
{
@@ -913,7 +914,7 @@ namespace OpenSim.Region.Terrain
}
//bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
- imageData = OpenJPEGNet.OpenJPEG.EncodeFromImage(bmp, "map");
+ imageData = OpenJPEG.EncodeFromImage(bmp, "map");
}
catch (Exception e)
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
index e0ae586..feb9327 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
@@ -26,16 +26,12 @@
*
*/
using System;
-using System.Collections.Generic;
-using System.Text;
-
using System.CodeDom.Compiler;
-using System.CodeDom;
+using System.Collections.Generic;
+using libTerrain;
using Microsoft.CSharp;
using Microsoft.JScript;
-using libTerrain;
-
namespace OpenSim.Region.Terrain
{
public interface ITerrainFilter
--
cgit v1.1