feat: Replaced pragma with include guards#82
Merged
divy9881 merged 1 commit intoapache:masterfrom Mar 11, 2021
Merged
Conversation
cdf3667 to
271ba2c
Compare
Contributor
|
Rebase or soft-reset your commits, and make your commit message semantic to pass the semantic-PR CI. |
Signed-off-by: Yash Pandey (YP) <yash.btech.cs19@iiitranchi.ac.in>
271ba2c to
5a2807b
Compare
Contributor
Author
|
I think the CI is happy now. Thanks! |
Contributor
|
LGTM |
|
🎉 This PR is included in version 1.11.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Yash Pandey (YP) yash.btech.cs19@iiitranchi.ac.in
This PR fixes #80
Description
Although
#pragma onceis less prone to errors and is supported by a wide range of compliers, they produce some warnings when compiling with Clang or GCC on MacOS and Linux. I carefully replaced#pragma onceand implemented include guards in each cpp file. Here is a glimpse of what it looks like for a file, sayfoo.cpp:Note on compilation
There were no warnings generated on build for all configurations after implementing this.
Tested on
OS: Darwin arm64 20.3.0
Compiler: Clang 12.0.0
Effective build time: ~12 seconds