Fix TPA map hash calculation. (#288)
[platform/upstream/coreclr.git] / src / binder / inc / applicationcontext.hpp
index cd1a245..f315b32 100644 (file)
@@ -71,8 +71,12 @@ namespace BINDER_SPACE
             key = e.m_wszSimpleName;
             return key;
         }
-        static count_t Hash(const key_t &str) { return HashiString(str); }
-        static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (_wcsicmp(lhs, rhs) == 0); }
+        static count_t Hash(const key_t &str)
+        {
+            SString ssKey(SString::Literal, str);
+            return ssKey.HashCaseInsensitive();
+        }
+        static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (SString::_wcsicmp(lhs, rhs) == 0); }
         
         void OnDestructPerEntryCleanupAction(const SimpleNameToFileNameMapEntry & e)
         {
@@ -173,19 +177,6 @@ namespace BINDER_SPACE
 
         SimpleNameToFileNameMap * m_pTrustedPlatformAssemblyMap;
         TpaFileNameHash    * m_pFileNameHash;
-        
-        bool m_fCanExplicitlyBindToNativeImages;
-public:        
-        inline void SetExplicitBindToNativeImages(bool fCanExplicitlyBindToNativeImages)
-        {
-            m_fCanExplicitlyBindToNativeImages = fCanExplicitlyBindToNativeImages;
-        }
-        
-        inline bool CanExplicitlyBindToNativeImages()
-        {
-            return m_fCanExplicitlyBindToNativeImages;
-        }
-protected:        
     };
 
 #include "applicationcontext.inl"