From 7a5782c3e35950ccaf90fb7cfa8b0b54b2e3b8d9 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 29 Sep 2012 02:57:28 +0100 Subject: [PATCH] Get rid of some unnecessary casts in RemoteAdminPlugin. This was stopping http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass from working with some methods (e.g. create_user). However, this casting has been around for at least 2 years so I'm puzzled that it worked in the first place, though it probably is extremely old sample code. --- .../RemoteController/RemoteAdminPlugin.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 24570d617a..e60c54a422 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -572,7 +572,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController region.ExternalHostName = (string) requestData["external_address"]; - bool persist = Convert.ToBoolean((string) requestData["persist"]); + bool persist = Convert.ToBoolean(requestData["persist"]); if (persist) { // default place for region configuration files is in the @@ -982,8 +982,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController string lastName = (string) requestData["user_lastname"]; string password = (string) requestData["user_password"]; - uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); - uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); + uint regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); + uint regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); string email = ""; // empty string for email if (requestData.Contains("user_email")) @@ -1180,9 +1180,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; if (requestData.ContainsKey("start_region_x")) - regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); + regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); if (requestData.ContainsKey("start_region_y")) - regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); + regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); // if (requestData.ContainsKey("start_lookat_x")) // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]);