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

Assorted Warning Cleanup #595

Merged
merged 2 commits into from
Sep 14, 2019
Merged

Assorted Warning Cleanup #595

merged 2 commits into from
Sep 14, 2019

Conversation

Hoikas
Copy link
Member

@Hoikas Hoikas commented Sep 14, 2019

This changeset attempts to silence and/or fix some of the warnings emitted during compilation. When I began, 406 warnings were being emitted in my build. It is now down to 313 warnings. I avoided fixing uninitialized members to prevent conflicts with #576.

@Deledrius
Copy link
Member

🎖

Sources/Plasma/Apps/plClient/plClient.cpp Outdated Show resolved Hide resolved
Sources/Plasma/CoreLib/hsBitVector.h Outdated Show resolved Hide resolved
Sources/Plasma/CoreLib/hsBitVector.h Outdated Show resolved Hide resolved
int minNum = fNumBitVectors < other.fNumBitVectors ? fNumBitVectors : other.fNumBitVectors;
int i;
for( i = 0; i < minNum; i++ )
uint32_t minNum = fNumBitVectors < other.fNumBitVectors ? fNumBitVectors : other.fNumBitVectors;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::min

Copy link
Member Author

@Hoikas Hoikas Sep 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to include the algorithm header in this header? Presently, it is not included.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, probably not worth it here...

lastParChunk = nullptr;
} else if(lastParChunk) {
size_t count = ((uintptr_t)c - (uintptr_t)start) / sizeof(wchar_t); // wchar_t is 2 bytes
lastParChunk->fText.assign(start, 0, count);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

This got a little out of hand from the initial warning cleanup. This
should be a priority for ST::string-ification and perhaps
std::unique_ptr-ification as well. For now, this makes life a lot easier
by removing some warnings and stupid string copying.
@Hoikas
Copy link
Member Author

Hoikas commented Sep 14, 2019

Pushed fixes for all, save the one question re std::min.

@Hoikas Hoikas merged commit d3bd52b into H-uru:master Sep 14, 2019
@Hoikas Hoikas deleted the warning_cleanup branch September 14, 2019 23:07
Hoikas added a commit to Hoikas/Plasma that referenced this pull request Nov 11, 2019
Hoikas added a commit to Hoikas/Plasma that referenced this pull request Nov 13, 2019
Hoikas added a commit that referenced this pull request Nov 14, 2019
Fix PBML parsing errors introduced in #595.
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.

None yet

3 participants