Simplify to use NOT operator instead of comparing to false. (#32398)
authorpi1024e <49824824+pi1024e@users.noreply.github.com>
Sun, 16 Feb 2020 19:57:51 +0000 (14:57 -0500)
committerGitHub <noreply@github.com>
Sun, 16 Feb 2020 19:57:51 +0000 (11:57 -0800)
src/coreclr/src/md/compiler/filtermanager.cpp
src/coreclr/src/pal/src/locale/utf8.cpp
src/coreclr/src/vm/appdomain.cpp

index 9a5033f..3648c5c 100644 (file)
@@ -135,7 +135,7 @@ HRESULT FilterManager::MarkAssembly(mdAssembly as)
 {
     HRESULT         hr = NOERROR;
 
-    if (hasAssemblyBeenMarked == false)
+    if (!hasAssemblyBeenMarked)
     {
         hasAssemblyBeenMarked = true;
         IfFailGo( MarkCustomAttributesWithParentToken(as) );
@@ -153,7 +153,7 @@ HRESULT FilterManager::MarkModule(mdModule mo)
 {
     HRESULT         hr = NOERROR;
 
-    if (hasModuleBeenMarked == false)
+    if (!hasModuleBeenMarked)
     {
         hasModuleBeenMarked = true;
         IfFailGo( MarkCustomAttributesWithParentToken(mo) );
index f34df4f..d263248 100644 (file)
@@ -335,7 +335,7 @@ protected:
                     else
                     {
                         // Low surrogate
-                        if (bHighSurrogate == false)
+                        if (!bHighSurrogate)
                             throw ArgumentException("String 'chars' contains invalid Unicode code points.");
                         bHighSurrogate = false;
                     }
@@ -391,7 +391,7 @@ protected:
                     else
                     {
                         // Low surrogate
-                        if (bHighSurrogate == false)
+                        if (!bHighSurrogate)
                             throw ArgumentException("String 'chars' contains invalid Unicode code points.");
                         bHighSurrogate = false;
                     }
index 3a7a941..44aa02d 100644 (file)
@@ -6342,7 +6342,7 @@ HRESULT RuntimeInvokeHostAssemblyResolver(INT_PTR pManagedAssemblyLoadContextToB
                 else
                 {
                     pLoadedPEAssembly = pDomainAssembly->GetFile();
-                    if (pLoadedPEAssembly->HasHostAssembly() != true)
+                    if (!pLoadedPEAssembly->HasHostAssembly())
                     {
                         // Reflection emitted assemblies will not have a domain assembly.
                         fFailLoad = true;