From b032f114d29aae35931382a723ba1c94053d4365 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 22 Sep 2024 12:08:22 -0700 Subject: [PATCH] Delete unused RedirectFunctor abstraction --- src/coreclr/vm/class.cpp | 35 ++++++----------------------------- src/coreclr/vm/methodtable.h | 3 --- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/src/coreclr/vm/class.cpp b/src/coreclr/vm/class.cpp index 8e6de1746c0372..a1a6465aae778e 100644 --- a/src/coreclr/vm/class.cpp +++ b/src/coreclr/vm/class.cpp @@ -2243,8 +2243,7 @@ CorNativeLinkType MethodTable::GetCharSet() // Helper routines for the macros defined at the top of this class. // You probably should not use these functions directly. // -template -SString &MethodTable::_GetFullyQualifiedNameForClassNestedAwareInternal(SString &ssBuf) +SString &MethodTable::_GetFullyQualifiedNameForClassNestedAware(SString &ssBuf) { CONTRACTL { THROWS; @@ -2271,10 +2270,8 @@ SString &MethodTable::_GetFullyQualifiedNameForClassNestedAwareInternal(SString DWORD dwAttr; IfFailThrow(pImport->GetTypeDefProps(GetCl(), &dwAttr, NULL)); - RedirectFunctor redirectFunctor; if (IsTdNested(dwAttr)) { - StackSString ssFullyQualifiedName; StackSString ssPath; // Build the nesting chain. @@ -2288,43 +2285,23 @@ SString &MethodTable::_GetFullyQualifiedNameForClassNestedAwareInternal(SString &szEnclNameSpace)); ns::MakePath(ssPath, - StackSString(SString::Utf8, redirectFunctor(szEnclNameSpace)), + StackSString(SString::Utf8, szEnclNameSpace), StackSString(SString::Utf8, szEnclName)); - ssFullyQualifiedName.Clear(); - ssFullyQualifiedName.Append(ssPath); - ssFullyQualifiedName.Append('+'); - ssFullyQualifiedName.Append(ssName); + ssPath.Append('+'); + ssPath.Append(ssName); - ssName = ssFullyQualifiedName; + ssName = ssPath; } } ns::MakePath( ssBuf, - StackSString(SString::Utf8, redirectFunctor(pszNamespace)), ssName); + StackSString(SString::Utf8, pszNamespace), ssName); return ssBuf; } -class PassThrough -{ -public : - LPCUTF8 operator() (LPCUTF8 szEnclNamespace) - { - LIMITED_METHOD_CONTRACT; - - return szEnclNamespace; - } -}; - -SString &MethodTable::_GetFullyQualifiedNameForClassNestedAware(SString &ssBuf) -{ - LIMITED_METHOD_CONTRACT; - - return _GetFullyQualifiedNameForClassNestedAwareInternal(ssBuf); -} - //******************************************************************************* SString &MethodTable::_GetFullyQualifiedNameForClass(SString &ssBuf) { diff --git a/src/coreclr/vm/methodtable.h b/src/coreclr/vm/methodtable.h index e7e44470da3f9e..496d216079237c 100644 --- a/src/coreclr/vm/methodtable.h +++ b/src/coreclr/vm/methodtable.h @@ -3038,9 +3038,6 @@ public : SString &_GetFullyQualifiedNameForClass(SString &ssBuf); LPCUTF8 GetFullyQualifiedNameInfo(LPCUTF8 *ppszNamespace); -private: - template SString &_GetFullyQualifiedNameForClassNestedAwareInternal(SString &ssBuf); - public : //------------------------------------------------------------------- // Debug Info