Skip to content

Commit

Permalink
Fix contract and remove unused method overload (#100722)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronRobinsonMSFT authored Apr 6, 2024
1 parent e0ff36d commit 9b57a26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/coreclr/inc/sstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ class EMPTY_BASES_DECL SString : private SBuffer
public:
BOOL LoadResource(CCompRC::ResourceCategory eCategory, int resourceID);
HRESULT LoadResourceAndReturnHR(CCompRC::ResourceCategory eCategory, int resourceID);
HRESULT LoadResourceAndReturnHR(CCompRC* pResourceDLL, CCompRC::ResourceCategory eCategory, int resourceID);
BOOL FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId,
const SString &arg1 = Empty(), const SString &arg2 = Empty(),
const SString &arg3 = Empty(), const SString &arg4 = Empty(),
Expand Down
14 changes: 2 additions & 12 deletions src/coreclr/utilcode/sstring_com.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ BOOL SString::LoadResource(CCompRC::ResourceCategory eCategory, int resourceID)

HRESULT SString::LoadResourceAndReturnHR(CCompRC::ResourceCategory eCategory, int resourceID)
{
WRAPPER_NO_CONTRACT;
return LoadResourceAndReturnHR(NULL, eCategory,resourceID);
}

HRESULT SString::LoadResourceAndReturnHR(CCompRC* pResourceDLL, CCompRC::ResourceCategory eCategory, int resourceID)
{
CONTRACT(BOOL)
CONTRACT(HRESULT)
{
INSTANCE_CHECK;
NOTHROW;
Expand All @@ -38,11 +32,7 @@ HRESULT SString::LoadResourceAndReturnHR(CCompRC* pResourceDLL, CCompRC::Resourc
HRESULT hr = E_FAIL;

#ifndef FEATURE_UTILCODE_NO_DEPENDENCIES
if (pResourceDLL == NULL)
{
pResourceDLL = CCompRC::GetDefaultResourceDll();
}

CCompRC* pResourceDLL = CCompRC::GetDefaultResourceDll();
if (pResourceDLL != NULL)
{

Expand Down

0 comments on commit 9b57a26

Please sign in to comment.