More target-typed new and redundant paranthesis cleanup

This commit is contained in:
Kwoth
2021-12-20 00:33:11 +01:00
parent 345a9e9524
commit 1b2017024c
152 changed files with 573 additions and 580 deletions

View File

@@ -19,7 +19,7 @@ public class MultilineScalarFlowStyleEmitter : ChainedEventEmitter
{
var isMultiLine = value.IndexOfAny(new char[] { '\r', '\n', '\x85', '\x2028', '\x2029' }) >= 0;
if (isMultiLine)
eventInfo = new ScalarEventInfo(eventInfo.Source)
eventInfo = new(eventInfo.Source)
{
Style = ScalarStyle.Literal,
};

View File

@@ -26,7 +26,7 @@ public class YamlHelper
// Check the value and write the character.
if (character >= 0xD800 && character <= 0xDFFF || character > 0x10FFFF)
if (character is >= 0xD800 and <= 0xDFFF || character > 0x10FFFF)
{
return point;
}
@@ -37,9 +37,9 @@ public class YamlHelper
public static bool IsHex(char c)
{
return
(c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'F') ||
(c >= 'a' && c <= 'f');
c is >= '0' and <= '9' ||
c is >= 'A' and <= 'F' ||
c is >= 'a' and <= 'f';
}
public static int AsHex(char c)