CA-165366 Fix compile-time warning-as-error

This commit is contained in:
Stephen Turner 2015-05-28 14:00:06 +01:00
parent 786ea7937e
commit dd68c484a2
2 changed files with 2 additions and 2 deletions

View File

@ -606,7 +606,7 @@ namespace XenAdmin.Controls.XenSearch
private static GridVerticalArrayItem NewDoubleRowItem(Grouping grouping, object group)
{
string line1 = (grouping is BoolGrouping ? (grouping as BoolGrouping).GroupingName(group) : grouping.GroupingName); // exception for Boolean groups: CA-165366
string line1 = (grouping is BoolGrouping ? (grouping as BoolGrouping).GroupingName2(group) : grouping.GroupingName); // exception for Boolean groups: CA-165366
object line2 = (group is DateTime ? group : grouping.GetGroupName(group)); // exception for DateTime: CA-46983
List<GridStringItem> items = new List<GridStringItem>();
if (line1 != null)

View File

@ -323,7 +323,7 @@ namespace XenAdmin.XenSearch
this.i18nfalse = PropertyAccessors.PropertyNames_i18n_false[property];
}
public string GroupingName(object group)
public string GroupingName2(object group)
{
return (!(group is bool) /* shouldn't happen */ || (bool)group) ? i18n : i18nfalse;
}