diff --git a/LibreMetaverse.LslTools/Tools/CSToolsException.cs b/LibreMetaverse.LslTools/Tools/CSToolsException.cs index e92c755f..f918d7ca 100644 --- a/LibreMetaverse.LslTools/Tools/CSToolsException.cs +++ b/LibreMetaverse.LslTools/Tools/CSToolsException.cs @@ -69,7 +69,7 @@ namespace LibreMetaverse.LslTools } public CSToolsException(int en, SourceLineInfo s, string y, string m) - : base(s.ToString() + ": " + m) + : base(s + ": " + m) { this.nExceptionNumber = en; this.slInfo = s; diff --git a/LibreMetaverse.Tests/TypeTests.cs b/LibreMetaverse.Tests/TypeTests.cs index 51e77beb..af56b7d4 100644 --- a/LibreMetaverse.Tests/TypeTests.cs +++ b/LibreMetaverse.Tests/TypeTests.cs @@ -51,8 +51,8 @@ namespace LibreMetaverse.Tests UUID b = new UUID(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, 0); - Assert.IsTrue(a == b, "UUID comparison operator failed, " + a.ToString() + " should equal " + - b.ToString()); + Assert.IsTrue(a == b, "UUID comparison operator failed, " + a + " should equal " + + b); // From string a = new UUID(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, @@ -60,8 +60,8 @@ namespace LibreMetaverse.Tests string zeroonetwo = "00010203-0405-0607-0809-0a0b0c0d0e0f"; b = new UUID(zeroonetwo); - Assert.IsTrue(a == b, "UUID hyphenated string constructor failed, should have " + a.ToString() + - " but we got " + b.ToString()); + Assert.IsTrue(a == b, "UUID hyphenated string constructor failed, should have " + a + + " but we got " + b); // ToString() Assert.IsTrue(a == b); @@ -169,24 +169,24 @@ namespace LibreMetaverse.Tests Quaternion expected = new Quaternion(0, 0, 0, -1); Quaternion result = a * b; - Assert.IsTrue(result == expected, a.ToString() + " * " + b.ToString() + " produced " + result.ToString() + - " instead of " + expected.ToString()); + Assert.IsTrue(result == expected, a + " * " + b + " produced " + result + + " instead of " + expected); a = new Quaternion(1, 0, 0, 0); b = new Quaternion(0, 1, 0, 0); expected = new Quaternion(0, 0, 1, 0); result = a * b; - Assert.IsTrue(result == expected, a.ToString() + " * " + b.ToString() + " produced " + result.ToString() + - " instead of " + expected.ToString()); + Assert.IsTrue(result == expected, a + " * " + b + " produced " + result + + " instead of " + expected); a = new Quaternion(0, 0, 1, 0); b = new Quaternion(0, 1, 0, 0); expected = new Quaternion(-1, 0, 0, 0); result = a * b; - Assert.IsTrue(result == expected, a.ToString() + " * " + b.ToString() + " produced " + result.ToString() + - " instead of " + expected.ToString()); + Assert.IsTrue(result == expected, a + " * " + b + " produced " + result + + " instead of " + expected); } [Test] @@ -235,25 +235,25 @@ namespace LibreMetaverse.Tests string b = "1.2"; a = Helpers.FloatToTerseString(f); - Assert.IsTrue(a == b, f.ToString() + " converted to " + a + ", expecting " + b); + Assert.IsTrue(a == b, f + " converted to " + a + ", expecting " + b); f = 24.00f; b = "24"; a = Helpers.FloatToTerseString(f); - Assert.IsTrue(a == b, f.ToString() + " converted to " + a + ", expecting " + b); + Assert.IsTrue(a == b, f + " converted to " + a + ", expecting " + b); f = -0.59f; b = "-.59"; a = Helpers.FloatToTerseString(f); - Assert.IsTrue(a == b, f.ToString() + " converted to " + a + ", expecting " + b); + Assert.IsTrue(a == b, f + " converted to " + a + ", expecting " + b); f = 0.59f; b = ".59"; a = Helpers.FloatToTerseString(f); - Assert.IsTrue(a == b, f.ToString() + " converted to " + a + ", expecting " + b); + Assert.IsTrue(a == b, f + " converted to " + a + ", expecting " + b); } [Test] @@ -333,7 +333,7 @@ namespace LibreMetaverse.Tests string testThree = "{'region_handle':[r255232, r256512], 'position':[r33.6, r33.71, r43.13], 'look_at':[r34.6, r33.71, r43.13]}"; OSD obj = OSDParser.DeserializeLLSDNotation(testOne); - Assert.IsInstanceOf(obj, "Expected SDArray, got " + obj.GetType().ToString()); + Assert.IsInstanceOf(obj, "Expected SDArray, got " + obj.GetType()); OSDArray array = (OSDArray)obj; Assert.IsTrue(array.Count == 3, "Expected three contained objects, got " + array.Count); Assert.IsTrue(array[0].AsReal() > 0.9d && array[0].AsReal() < 1.0d, "Unexpected value for first real " + array[0].AsReal()); @@ -341,19 +341,19 @@ namespace LibreMetaverse.Tests Assert.IsTrue(array[2].AsReal() == 0.0d, "Unexpected value for third real " + array[2].AsReal()); obj = OSDParser.DeserializeLLSDNotation(testTwo); - Assert.IsInstanceOf(obj, "Expected SDArray, got " + obj.GetType().ToString()); + Assert.IsInstanceOf(obj, "Expected SDArray, got " + obj.GetType()); array = (OSDArray)obj; Assert.IsTrue(array.Count == 2, "Expected two contained objects, got " + array.Count); Assert.IsTrue(array[1].AsReal() == 0.0d, "Unexpected value for real " + array[1].AsReal()); obj = array[0]; - Assert.IsInstanceOf(obj, "Expected ArrayList, got " + obj.GetType().ToString()); + Assert.IsInstanceOf(obj, "Expected ArrayList, got " + obj.GetType()); array = (OSDArray)obj; Assert.IsTrue(array[0].AsReal() == 1.0d && array[1].AsReal() == 1.0d && array[2].AsReal() == 1.0d, "Unexpected value(s) for nested array: " + array[0].AsReal() + ", " + array[1].AsReal() + ", " + array[2].AsReal()); obj = OSDParser.DeserializeLLSDNotation(testThree); - Assert.IsInstanceOf(obj, "Expected LLSDMap, got " + obj.GetType().ToString()); + Assert.IsInstanceOf(obj, "Expected LLSDMap, got " + obj.GetType()); OSDMap hashtable = (OSDMap)obj; Assert.IsTrue(hashtable.Count == 3, "Expected three contained objects, got " + hashtable.Count); Assert.IsInstanceOf(hashtable["region_handle"]); diff --git a/LibreMetaverse.Tests/XmlLLSDTests.cs b/LibreMetaverse.Tests/XmlLLSDTests.cs index 3097ecd0..87a2ed39 100644 --- a/LibreMetaverse.Tests/XmlLLSDTests.cs +++ b/LibreMetaverse.Tests/XmlLLSDTests.cs @@ -660,8 +660,8 @@ namespace LibreMetaverse.Tests { if (inExpected[i] != binary[i]) { - Assert.Fail("Expected " + inExpected[i].ToString() + " at position " + i.ToString() + - " but saw " + binary[i].ToString()); + Assert.Fail("Expected " + inExpected[i] + " at position " + i + + " but saw " + binary[i]); } } } diff --git a/LibreMetaverse.Voice/VoiceControl.cs b/LibreMetaverse.Voice/VoiceControl.cs index eccd8f89..7998adaf 100644 --- a/LibreMetaverse.Voice/VoiceControl.cs +++ b/LibreMetaverse.Voice/VoiceControl.cs @@ -126,7 +126,7 @@ namespace LibreMetaverse.Voice oldAt = new Vector3d(1, 0, 0); slvoiceArgs = " -ll -1"; // Min logging - slvoiceArgs += " -i 127.0.0.1:" + daemonPort.ToString(); + slvoiceArgs += " -i 127.0.0.1:" + daemonPort; // slvoiceArgs += " -lf " + control.instance.ClientDir; } diff --git a/Programs/GridProxy/GridProxy.cs b/Programs/GridProxy/GridProxy.cs index 127e4894..936e1ae3 100644 --- a/Programs/GridProxy/GridProxy.cs +++ b/Programs/GridProxy/GridProxy.cs @@ -748,7 +748,7 @@ namespace GridProxy } else if (cap == null) { - OpenMetaverse.Logger.Log(string.Format("{0} {1}", req.Method, req.Address.ToString()), Helpers.LogLevel.Info); + OpenMetaverse.Logger.Log(string.Format("{0} {1}", req.Method, req.Address), Helpers.LogLevel.Info); } resp = (HttpWebResponse)req.GetResponse(); } @@ -848,7 +848,7 @@ namespace GridProxy } catch (InvalidCastException ex) { - OpenMetaverse.Logger.Log("Invalid Cast thrown trying to cast OSD to OSDMap: \n'" + capReq.Response.AsString() + "' Length=" + capReq.RawResponse.Length.ToString() + "\n", + OpenMetaverse.Logger.Log("Invalid Cast thrown trying to cast OSD to OSDMap: \n'" + capReq.Response.AsString() + "' Length=" + capReq.RawResponse.Length + "\n", Helpers.LogLevel.Error, ex); } catch (Exception ex) @@ -1240,7 +1240,7 @@ namespace GridProxy { if (map != null) { - OpenMetaverse.Logger.Log("Connection to server failed, returned LLSD error follows:\n" + map.ToString(), Helpers.LogLevel.Error); + OpenMetaverse.Logger.Log("Connection to server failed, returned LLSD error follows:\n" + map, Helpers.LogLevel.Error); } byte[] wr = Encoding.ASCII.GetBytes("HTTP/1.0 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n"); netStream.Write(wr, 0, wr.Length); diff --git a/Programs/mapgenerator/mapgenerator.cs b/Programs/mapgenerator/mapgenerator.cs index 1d7110a0..f097aeff 100644 --- a/Programs/mapgenerator/mapgenerator.cs +++ b/Programs/mapgenerator/mapgenerator.cs @@ -175,7 +175,7 @@ namespace Mapgenerator writer.WriteLine(" Buffer.BlockCopy(bytes, i, " + field.Name + ", 0, length); i += length;"); break; default: - writer.WriteLine("!!! ERROR: Unhandled FieldType: " + field.Type.ToString() + " !!!"); + writer.WriteLine("!!! ERROR: Unhandled FieldType: " + field.Type + " !!!"); break; } } @@ -253,7 +253,7 @@ namespace Mapgenerator field.Name + ".Length); " + "i += " + field.Name + ".Length;"); break; default: - writer.WriteLine("!!! ERROR: Unhandled FieldType: " + field.Type.ToString() + " !!!"); + writer.WriteLine("!!! ERROR: Unhandled FieldType: " + field.Type + " !!!"); break; } } @@ -291,7 +291,7 @@ namespace Mapgenerator case FieldType.Variable: return 0; default: - writer.WriteLine("!!! ERROR: Unhandled FieldType " + field.Type.ToString() + " !!!"); + writer.WriteLine("!!! ERROR: Unhandled FieldType " + field.Type + " !!!"); return 0; } }