Code Cleanup & Fixes Warnings (#74)
This commit is contained in:
parent
e11d1f3ad9
commit
57b14ad690
143 changed files with 2960 additions and 3427 deletions
|
|
@ -82,8 +82,7 @@ namespace Server.Commands
|
|||
if (baseInfo == null)
|
||||
m_Types[baseType] = baseInfo = new TypeInfo(baseType);
|
||||
|
||||
if (baseInfo.m_Derived == null)
|
||||
baseInfo.m_Derived = new List<TypeInfo>();
|
||||
baseInfo.m_Derived ??= new List<TypeInfo>();
|
||||
|
||||
baseInfo.m_Derived.Add(info);
|
||||
}
|
||||
|
|
@ -97,8 +96,7 @@ namespace Server.Commands
|
|||
if (decInfo == null)
|
||||
m_Types[decType] = decInfo = new TypeInfo(decType);
|
||||
|
||||
if (decInfo.m_Nested == null)
|
||||
decInfo.m_Nested = new List<TypeInfo>();
|
||||
decInfo.m_Nested ??= new List<TypeInfo>();
|
||||
|
||||
decInfo.m_Nested.Add(info);
|
||||
}
|
||||
|
|
@ -115,8 +113,7 @@ namespace Server.Commands
|
|||
if (ifaceInfo == null)
|
||||
m_Types[iface] = ifaceInfo = new TypeInfo(iface);
|
||||
|
||||
if (ifaceInfo.m_Derived == null)
|
||||
ifaceInfo.m_Derived = new List<TypeInfo>();
|
||||
ifaceInfo.m_Derived ??= new List<TypeInfo>();
|
||||
|
||||
ifaceInfo.m_Derived.Add(info);
|
||||
}
|
||||
|
|
@ -265,20 +262,13 @@ namespace Server.Commands
|
|||
|
||||
typeName = name ?? type.Name;
|
||||
|
||||
if (fnam == null) fileName = $"docs/types/{SanitizeType(type.Name)}.html";
|
||||
else fileName = $"{fnam}.html";
|
||||
fileName = fnam == null ? $"docs/types/{SanitizeType(type.Name)}.html" : $"{fnam}.html";
|
||||
|
||||
if (link == null)
|
||||
{
|
||||
if (DontLink(type)) //if ( DontLink( type.Name ) )
|
||||
linkName = $"<font color=\"blue\">{SanitizeType(type.Name)}</font>";
|
||||
else
|
||||
linkName = $"<a href=\"@directory@{SanitizeType(type.Name)}.html\">{SanitizeType(type.Name)}</a>";
|
||||
}
|
||||
linkName = DontLink(type) ? $"<font color=\"blue\">{SanitizeType(type.Name)}</font>"
|
||||
: $"<a href=\"@directory@{SanitizeType(type.Name)}.html\">{SanitizeType(type.Name)}</a>";
|
||||
else
|
||||
{
|
||||
linkName = link;
|
||||
}
|
||||
|
||||
//Console.WriteLine( typeName+":"+fileName+":"+linkName );
|
||||
}
|
||||
|
|
@ -604,8 +594,7 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
|
||||
if (aliased == null)
|
||||
aliased = realType?.Name ?? "";
|
||||
aliased ??= realType?.Name ?? "";
|
||||
}
|
||||
|
||||
return string.Concat(prepend, aliased, append, name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue