From 1de6cffa28348975a2492ce1e8a85c365df4dfaf Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 1 May 2008 20:47:33 +0000 Subject: * Refactor: Remove the unused userID parameter that was being passed into almost every inventory method * This allows lots of redundant inventory methods with only slightly different names to be eliminated. --- OpenSim/Data/MySQL/MySQLInventoryData.cs | 63 ++++---------------------------- 1 file changed, 7 insertions(+), 56 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index c9765c0..b529d4e 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -332,62 +332,13 @@ namespace OpenSim.Data.MySQL item.InvType = (int) reader["invType"]; item.Creator = new LLUUID((string) reader["creatorID"]); item.BasePermissions = (uint) reader["inventoryBasePermissions"]; - item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; - - try - { - item.SalePrice = (int) reader["salePrice"]; - } - catch (InvalidCastException) - { - m_log.WarnFormat("Could not cast salePrice {0} to {1}", reader["salePrice"], "int"); - } - - try - { - item.SaleType = Convert.ToByte(reader["saleType"]); - } - catch (InvalidCastException) - { - m_log.WarnFormat("Could not convert saleType {0} to {1}", reader["saleType"], "byte"); - } - - try - { - item.CreationDate = (int) reader["creationDate"]; - } - catch (InvalidCastException) - { - m_log.WarnFormat("Could not cast creationDate {0} to {1}", reader["creationDate"], "int"); - } - - try - { - item.GroupID = new LLUUID(reader["groupID"].ToString()); - } - catch (Exception) - { - item.GroupID = LLUUID.Zero; - m_log.WarnFormat("Could not convert groupID {0} to {1}", reader["groupID"], "LLUUID"); - } - - try - { - item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); - } - catch (InvalidCastException) - { - m_log.WarnFormat("Could not cast groupOwned {0} to {1}", reader["groupOwned"], "boolean"); - } - - try - { - item.Flags = (uint) reader["flags"]; - } - catch (InvalidCastException) - { - m_log.WarnFormat("Could not cast flags {0} to {1}", reader["flags"], "uint"); - } + item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; + item.SalePrice = (int) reader["salePrice"]; + item.SaleType = Convert.ToByte(reader["saleType"]); + item.CreationDate = (int) reader["creationDate"]; + item.GroupID = new LLUUID(reader["groupID"].ToString()); + item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); + item.Flags = (uint) reader["flags"]; return item; } -- cgit v1.1