Skip to content
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

Fixed compilation errors for projects with unicode settings enabled #120

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

NotRequiem
Copy link
Collaborator

  • Fixed string function returning nullptr instead of empty strings when handling failure
  • Initialized core class variables to avoid ISO standard warnings
  • Modified the usage of const_cast to _T
const struct map_key {
            LPCTSTR KeyPath;
            LPCTSTR ValueName;
        } ResourceRegistryKeys[ResourceRegistryKeysLength] = {
            {
                const_cast<LPTSTR>("Hardware\\ResourceMap\\System Resources\\Physical Memory"),
                const_cast<LPTSTR>(".Translated")
                _T("Hardware\\ResourceMap\\System Resources\\Physical Memory"),
                _T(".Translated")
            },
            {
                const_cast<LPTSTR>("Hardware\\ResourceMap\\System Resources\\Reserved"),
                const_cast<LPTSTR>(".Translated")
                _T("Hardware\\ResourceMap\\System Resources\\Reserved"),
                _T(".Translated")
            },
            {
                const_cast<LPTSTR>("Hardware\\ResourceMap\\System Resources\\Loader Reserved"),
                const_cast<LPTSTR>(".Raw")
                _T("Hardware\\ResourceMap\\System Resources\\Loader Reserved"),
                _T(".Raw")
            }
        };
  • Made some lambda functions use const variables to improve performance
  • Changed the unicode/ascii usage of certain Windows API calls

@kernelwernel kernelwernel merged commit 170d5f3 into kernelwernel:main Aug 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants