-
Notifications
You must be signed in to change notification settings - Fork 5.2k
delete deadcode from nsutilpriv.h #108104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @mangod9 |
| // Concatenate type names to assembly names | ||
| //***************************************************************************** | ||
| static | ||
| bool MakeAssemblyQualifiedName( // true if ok, false if out of memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MakeAssemblyQualifiedName methods look like dead code. Could you please delete them instead?
| int dwAssemblyName); // Number of characters (not including null) | ||
|
|
||
| static | ||
| int MakeNestedTypeName( // true ok, false out of memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MakeNestedTypeName is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only third one with stack string is in use
| // Concatinate type names to assembly names | ||
| //***************************************************************************** | ||
| static | ||
| bool MakeAssemblyQualifiedName( // true if ok, false if out of memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also delete the implementation in https://github.com/dotnet/runtime/blob/main/src/coreclr/utilcode/namespaceutil.cpp
255b288 to
47c3cfb
Compare
src/coreclr/inc/nsutilpriv.h
Outdated
| #ifdef _PREFAST_ | ||
| // need to set ptr=NULL so we don't get a build error because ptr isn't inited in a couple cases | ||
| #define MAKE_FULLY_QUALIFIED_MEMBER_NAME(ptr, pszNameSpace, pszClassName, pszMemberName, pszSig) ptr=NULL; | ||
| #else //_PREFAST_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #ifdef _PREFAST_ | |
| // need to set ptr=NULL so we don't get a build error because ptr isn't inited in a couple cases | |
| #define MAKE_FULLY_QUALIFIED_MEMBER_NAME(ptr, pszNameSpace, pszClassName, pszMemberName, pszSig) ptr=NULL; | |
| #else //_PREFAST_ |
This should not be needed.
src/coreclr/inc/nsutilpriv.h
Outdated
| int __i##ptr = ns::GetFullLength(pszNameSpace, pszClassName); \ | ||
| __i##ptr += (pszMemberName ? (int) strlen(pszMemberName) : 0); \ | ||
| __i##ptr += (NAMESPACE_SEPARATOR_LEN * 2); \ | ||
| __i##ptr += (int)strlen(NAMESPACE_SEPARATOR_STR) + 1; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change does not look right. The code below adds NAMESPACE_SEPARATOR_STR up to two times, so it makes sense that NAMESPACE_SEPARATOR_LEN was multiplied by two.
jkotas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
No description provided.