Fix StyleCop warning SA1008 (opening paren spacing)
authorStephen Toub <stoub@microsoft.com>
Tue, 20 Aug 2019 01:27:54 +0000 (21:27 -0400)
committerStephen Toub <stoub@microsoft.com>
Thu, 22 Aug 2019 01:25:51 +0000 (21:25 -0400)
Commit migrated from https://github.com/dotnet/coreclr/commit/604264d025f794d44cdb1a8195aae0017616ec42

22 files changed:
src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs
src/coreclr/src/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
src/coreclr/src/System.Private.CoreLib/src/System/GC.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs
src/libraries/System.Private.CoreLib/src/System/DateTime.Windows.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrame.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/KoreanCalendar.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/TaiwanCalendar.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/TaiwanLunisolarCalendar.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/ThaiBuddhistCalendar.cs
src/libraries/System.Private.CoreLib/src/System/Index.cs
src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
src/libraries/System.Private.CoreLib/src/System/Text/ASCIIEncoding.cs
src/libraries/System.Private.CoreLib/src/System/Text/EncodingNLS.cs
src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs
src/libraries/System.Private.CoreLib/src/System/Text/UTF7Encoding.cs
src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs
src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs

index cd5d8d4..6a56283 100644 (file)
@@ -53,11 +53,11 @@ namespace System
         [CLSCompliant(false)]
         public TypedReference GetNextArg()
         {
-            TypedReference result = new TypedReference ();
+            TypedReference result = new TypedReference();
             // reference to TypedReference is banned, so have to pass result as pointer
             unsafe
             {
-                FCallGetNextArg (&result);
+                FCallGetNextArg(&result);
             }
             return result;
         }
@@ -87,7 +87,7 @@ namespace System
                 if (ArgPtr == IntPtr.Zero)
                     throw new ArgumentNullException();
 
-                TypedReference result = new TypedReference ();
+                TypedReference result = new TypedReference();
                 // reference to TypedReference is banned, so have to pass result as pointer
                 unsafe
                 {
index 188b832..9cf4c6b 100644 (file)
@@ -155,7 +155,7 @@ namespace System
                 return unchecked((int)((long)this._methodPtrAux));
             */
             if (_methodPtrAux == IntPtr.Zero)
-                return ( _target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode();
+                return (_target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode();
             else
                 return GetType().GetHashCode();
         }
index 5405704..9573293 100644 (file)
@@ -626,7 +626,7 @@ namespace System
 
             lock (s_notifications)
             {
-                s_notifications.Add (new MemoryLoadChangeNotification(lowMemoryPercent, highMemoryPercent, notification));
+                s_notifications.Add(new MemoryLoadChangeNotification(lowMemoryPercent, highMemoryPercent, notification));
 
                 if (s_notifications.Count == 1)
                 {
index 135fd3e..021c154 100644 (file)
@@ -1171,7 +1171,7 @@ namespace System.Reflection.Emit
             {
                 return new MethodToken(GetMemberRefToken(method, null));
             }
-            else if ( method is SymbolMethod symMethod)
+            else if (method is SymbolMethod symMethod)
             {
                 if (symMethod.GetModule() == this)
                     return symMethod.GetToken();
index e4f503e..820d68b 100644 (file)
@@ -4286,7 +4286,7 @@ namespace System
                     {
                         if (isString)
                         {
-                            newArray[currElem] = wrapperCons.Invoke(new object?[] {(string?)oldArray.GetValue(currElem)});
+                            newArray[currElem] = wrapperCons.Invoke(new object?[] { (string?)oldArray.GetValue(currElem)});
                         }
                         else
                         {
index ebfed3c..81ca09d 100644 (file)
@@ -70,7 +70,7 @@ namespace System
             ticks += TimeToTicks(time.systemTime.Hour, time.systemTime.Minute, time.systemTime.Second);
             ticks += time.systemTime.Milliseconds * TicksPerMillisecond;
             ticks += time.hundredNanoSecond;
-            return new DateTime( ((ulong)(ticks)) | KindUtc);
+            return new DateTime(((ulong)(ticks)) | KindUtc);
         }
 
         // FullSystemTime struct is the SYSTEMTIME struct with extra hundredNanoSecond field to store more precise time.
index 1683206..a5ad117 100644 (file)
@@ -111,7 +111,7 @@ namespace System.Diagnostics
         /// use the debugger's line mapping logic.
         /// </summary>
         public StackFrame(string? fileName, int lineNumber, int colNumber)
-            : this (fileName, lineNumber)
+            : this(fileName, lineNumber)
         {
             _columnNumber = colNumber;
         }
index 940a6ff..2d8b70f 100644 (file)
@@ -1447,10 +1447,10 @@ namespace System.Globalization
                     if (GlobalizationMode.Invariant)
                     {
                         m_SortVersion = new SortVersion(0, CultureInfo.LOCALE_INVARIANT, new Guid(0, 0, 0, 0, 0, 0, 0,
-                                                                        (byte) (CultureInfo.LOCALE_INVARIANT >> 24),
-                                                                        (byte) ((CultureInfo.LOCALE_INVARIANT  & 0x00FF0000) >> 16),
-                                                                        (byte) ((CultureInfo.LOCALE_INVARIANT  & 0x0000FF00) >> 8),
-                                                                        (byte) (CultureInfo.LOCALE_INVARIANT  & 0xFF)));
+                                                                        (byte)(CultureInfo.LOCALE_INVARIANT >> 24),
+                                                                        (byte)((CultureInfo.LOCALE_INVARIANT  & 0x00FF0000) >> 16),
+                                                                        (byte)((CultureInfo.LOCALE_INVARIANT  & 0x0000FF00) >> 8),
+                                                                        (byte)(CultureInfo.LOCALE_INVARIANT  & 0xFF)));
                     }
                     else
                     {
index 69dbd88..cd33164 100644 (file)
@@ -619,7 +619,7 @@ namespace System.Globalization
                 if (name[i] >= 'A' && name[i] <= 'Z')
                 {
                     // lowercase characters before '-'
-                    normalizedName[i] = (char) (((int)name[i]) + 0x20);
+                    normalizedName[i] = (char)(((int)name[i]) + 0x20);
                     changed = true;
                 }
                 else
@@ -639,7 +639,7 @@ namespace System.Globalization
             {
                 if (name[i] >= 'a' && name[i] <= 'z')
                 {
-                    normalizedName[i] = (char) (((int)name[i]) - 0x20);
+                    normalizedName[i] = (char)(((int)name[i]) - 0x20);
                     changed = true;
                 }
                 else
index 07b6a1a..5bd1a9a 100644 (file)
@@ -1306,7 +1306,7 @@ namespace System.Globalization
             }
         }
 
-        internal bool HasSpacesInMonthNames =>(FormatFlags & DateTimeFormatFlags.UseSpacesInMonthNames) != 0;
+        internal bool HasSpacesInMonthNames => (FormatFlags & DateTimeFormatFlags.UseSpacesInMonthNames) != 0;
 
         internal bool HasSpacesInDayNames => (FormatFlags & DateTimeFormatFlags.UseSpacesInDayNames) != 0;
 
index 699b484..d9ded69 100644 (file)
@@ -30,7 +30,7 @@ namespace System.Globalization
         // Gregorian year 2001 is Korean year 4334.
         private static readonly EraInfo[] s_koreanEraInfo = new EraInfo[]
         {
-            new EraInfo( 1, 1, 1, 1, -2333, 2334, GregorianCalendar.MaxYear + 2333)   // era #, start year/month/day, yearOffset, minEraYear
+            new EraInfo(1, 1, 1, 1, -2333, 2334, GregorianCalendar.MaxYear + 2333)   // era #, start year/month/day, yearOffset, minEraYear
         };
 
         private readonly GregorianCalendarHelper _helper;
index 9239731..edd599b 100644 (file)
@@ -25,7 +25,7 @@ namespace System.Globalization
         //  So yearOffset = 1911
         private static readonly EraInfo[] s_taiwanEraInfo = new EraInfo[]
         {
-            new EraInfo( 1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911)    // era #, start year/month/day, yearOffset, minEraYear
+            new EraInfo(1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911)    // era #, start year/month/day, yearOffset, minEraYear
         };
 
         private static volatile Calendar? s_defaultInstance;
index 738fef3..c1ee6db 100644 (file)
@@ -20,7 +20,7 @@ namespace System.Globalization
         //  So yearOffset = 1911
         private static readonly EraInfo[] s_taiwanLunisolarEraInfo = new EraInfo[]
         {
-            new EraInfo( 1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911)    // era #, start year/month/day, yearOffset, minEraYear
+            new EraInfo(1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911)    // era #, start year/month/day, yearOffset, minEraYear
         };
 
         private readonly GregorianCalendarHelper _helper;
index 8bc48db..96ecea7 100644 (file)
@@ -19,7 +19,7 @@ namespace System.Globalization
     {
         private static readonly EraInfo[] s_thaiBuddhistEraInfo = new EraInfo[]
         {
-            new EraInfo( 1, 1, 1, 1, -543, 544, GregorianCalendar.MaxYear + 543)     // era #, start year/month/day, yearOffset, minEraYear
+            new EraInfo(1, 1, 1, 1, -543, 544, GregorianCalendar.MaxYear + 543)     // era #, start year/month/day, yearOffset, minEraYear
         };
 
         public const int ThaiBuddhistEra = 1;
index 0e4d851..14850c9 100644 (file)
@@ -121,7 +121,7 @@ namespace System
 
         /// <summary>Indicates whether the current Index object is equal to another Index object.</summary>
         /// <param name="other">An object to compare with this object</param>
-        public bool Equals (Index other) => _value == other._value;
+        public bool Equals(Index other) => _value == other._value;
 
         /// <summary>Returns the hash code for this instance.</summary>
         public override int GetHashCode() => _value;
index 4a5ca1f..d3c2c9b 100644 (file)
@@ -141,7 +141,7 @@ namespace System
         [CLSCompliant(false)]
         [Intrinsic]
         [NonVersionable]
-        public static unsafe explicit operator void* (IntPtr value)
+        public static unsafe explicit operator void*(IntPtr value)
         {
             return value._value;
         }
index 655d443..4a89a6c 100644 (file)
@@ -667,7 +667,7 @@ namespace System.Text
             {
                 char replacementChar = replacementFallback.DefaultString[0];
 
-                int numElementsToConvert = Math.Min( bytes.Length, chars.Length);
+                int numElementsToConvert = Math.Min(bytes.Length, chars.Length);
                 int idx = 0;
 
                 fixed (byte* pBytes = &MemoryMarshal.GetReference(bytes))
index 4420447..fdb66f6 100644 (file)
@@ -223,7 +223,7 @@ namespace System.Text
             if (byteIndex < 0 || byteCount < 0)
                 throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
 
-            if ( bytes.Length - byteIndex < byteCount)
+            if (bytes.Length - byteIndex < byteCount)
                 throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
 
             if (charIndex < 0 || charIndex > chars.Length)
index 0687830..3063a25 100644 (file)
@@ -294,7 +294,7 @@ namespace System.Text
             if (byteIndex < 0 || byteCount < 0)
                 throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
 
-            if ( bytes.Length - byteIndex < byteCount)
+            if (bytes.Length - byteIndex < byteCount)
                 throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
 
             if (charIndex < 0 || charIndex > chars.Length)
index 6398f7e..407fa9a 100644 (file)
@@ -327,7 +327,7 @@ namespace System.Text
             if (byteIndex < 0 || byteCount < 0)
                 throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
 
-            if ( bytes.Length - byteIndex < byteCount)
+            if (bytes.Length - byteIndex < byteCount)
                 throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
 
             if (charIndex < 0 || charIndex > chars.Length)
index ed7a0d9..1fa6ed6 100644 (file)
@@ -285,7 +285,7 @@ namespace System.Text
             if (byteIndex < 0 || byteCount < 0)
                 throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
 
-            if ( bytes.Length - byteIndex < byteCount)
+            if (bytes.Length - byteIndex < byteCount)
                 throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
 
             if (charIndex < 0 || charIndex > chars.Length)
@@ -406,7 +406,7 @@ namespace System.Text
                     // No fallback, maybe we can do it fast
 #if FASTLOOP
                     // If endianess is backwards then each pair of bytes would be backwards.
-                    if ( (bigEndian ^ BitConverter.IsLittleEndian) &&
+                    if ((bigEndian ^ BitConverter.IsLittleEndian) &&
 #if BIT64
                         (unchecked((long)chars) & 7) == 0 &&
 #else
@@ -695,7 +695,7 @@ namespace System.Text
                     // No fallback, maybe we can do it fast
 #if FASTLOOP
                     // If endianess is backwards then each pair of bytes would be backwards.
-                    if ( (bigEndian ^ BitConverter.IsLittleEndian) &&
+                    if ((bigEndian ^ BitConverter.IsLittleEndian) &&
 #if BIT64
                         (unchecked((long)chars) & 7) == 0 &&
 #else
index 01c4e17..dff3da0 100644 (file)
@@ -134,7 +134,7 @@ namespace System
 
         [Intrinsic]
         [NonVersionable]
-        public static unsafe explicit operator void* (UIntPtr value)
+        public static unsafe explicit operator void*(UIntPtr value)
         {
             return value._value;
         }