From 7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Nov 2013 21:45:08 +0000 Subject: refactor: replace verbose checks with String.IsNullOrEmpty where applicable. Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845 --- OpenSim/Framework/Monitoring/Stats/Stat.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Monitoring') diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs index 2b34493..e095801 100644 --- a/OpenSim/Framework/Monitoring/Stats/Stat.cs +++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs @@ -231,7 +231,7 @@ namespace OpenSim.Framework.Monitoring Container, ShortName, Value, - UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); + string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName)); AppendMeasuresOfInterest(sb); @@ -316,9 +316,9 @@ namespace OpenSim.Framework.Monitoring sb.AppendFormat( ", {0:0.##}{1}/s, {2:0.##}{3}/s", lastChangeOverTime, - UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName), + string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName), averageChangeOverTime, - UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); + string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName)); } } } -- cgit v1.1