mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
More target-typed new and redundant paranthesis cleanup
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user