Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Rationalize type and function usage in native parts of DNX #1603

Closed
moozzyk opened this issue Apr 7, 2015 · 4 comments
Closed

Rationalize type and function usage in native parts of DNX #1603

moozzyk opened this issue Apr 7, 2015 · 4 comments
Assignees
Milestone

Comments

@moozzyk
Copy link
Contributor

moozzyk commented Apr 7, 2015

Currently we mix different aliases of types across the code e.g. WCHAR*, LPWSTR, LPTSTR are used all over the place (e.g. bool GetTrustedPlatformAssembliesList(WCHAR* szDirectory, bool bNative, LPWSTR pszTrustedPlatformAssemblies, size_t cchTrustedPlatformAssemblies))
even though they are basically the same type.

Similarly we mix usage of _T and L macros and also mix string functions like _tcs* and wcs* and
_tprintf_s vs. wprintf_s

We should just use one alias or ideally - switch to STL and not use them at all.

We could consider creating our own alias for std::string and std::wstring (like dnx::string_t) type that would be used across the codebase regardless of what platform we are using.

@analogrelay
Copy link
Contributor

We should just use one alias or ideally - switch to STL and not use them at all.

👍 👍 👍

@BrennanConroy
Copy link
Member

Biggest concern with STL is if we are concerned about speed. Otherwise I'm all for it
@davidfowl

@davidfowl
Copy link
Member

@moozzyk is this still relevant with all of your refactorings?

@moozzyk
Copy link
Contributor Author

moozzyk commented Jul 21, 2015

@davidfowl - yes. Most of the occurrences are being fixed in #2263 which has not been merged yet. I will need to do a final sweep after #2263 is merged since fixing this was not the main goal there.

@moozzyk moozzyk self-assigned this Jul 21, 2015
@muratg muratg added this to the 1.0.0-beta7 milestone Jul 21, 2015
@muratg muratg added the bug label Jul 21, 2015
@glennc glennc modified the milestones: 1.0.0-beta8, 1.0.0-beta7 Aug 6, 2015
@muratg muratg modified the milestones: 1.0.0-rc1, 1.0.0-beta8 Sep 22, 2015
moozzyk pushed a commit that referenced this issue Sep 28, 2015
moozzyk pushed a commit that referenced this issue Sep 29, 2015
moozzyk pushed a commit that referenced this issue Sep 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants