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

Use pragma once in more places #3182

Merged
merged 7 commits into from
Oct 12, 2020

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Oct 9, 2020

Problem

pragma once is shorter code, does not pollute global namespace and is faster to compile. All our compilers support it.

Summary of Changes

wrote a script to auto-pragma-once headers and ran it in many places (skipped lwip and app)

Fixes #3138

@BroderickCarlin BroderickCarlin merged commit 1873e8c into project-chip:master Oct 12, 2020
rwalker-apple pushed a commit to bzbarsky-apple/connectedhomeip that referenced this pull request Oct 12, 2020
* Add a lot of pragma once changes. Now scripted!

* update pragma once in setup payload

* More pragma once

* Pragma once within platform and more

* pragma once in the crypto layer

* pragma once in examples

* Fix by restyle-diff
rwalker-apple pushed a commit that referenced this pull request Oct 12, 2020
* Use enum class for TLVElementType and TLVTagControl.

This makes it easy to give them as specific size spec, which will
prevent issues with people adding out-of-range values and simplify
-Wconversion work.

* Check if the result of EncodeCommand is successful before trying to send the command (#3151)

* Remove verbose code comments (#3187)

Some devices are configured to act as Thread router instead of
sleepy-end device. This PR removes these incorrect or verbose comments.

* Remove {#mainpage} from the main README.md file (#3190)

* Remove Makefiles introduced by #3099 (#3191)

* [nRF Connect] README updates on Docker for MacOS and NCS version (#3175)

* [nRF Connect] README updates on Docker for MacOS and NCS version

* Restyled by prettier-markdown

* Rephrase a sentence

Co-authored-by: Restyled.io <commits@restyled.io>

* Modify the generated files for example lighting and lock apps to include server init callbacks. (#3180)

This allows the app to implement
emberAfPluginOnOffClusterServerPostInitCallback to sync up the data
model state with the state of the actual device when the data model
initializes.

* Use pragma once in more places (#3182)

* Add a lot of pragma once changes. Now scripted!

* update pragma once in setup payload

* More pragma once

* Pragma once within platform and more

* pragma once in the crypto layer

* pragma once in examples

* Fix by restyle-diff

* [android] Use ATT Write Request instead of ATT Write Command (#3161)

Co-authored-by: Vivien Nicolas <vnicolas@apple.com>
Co-authored-by: Yakun Xu <xyk@google.com>
Co-authored-by: Damian Królik <66667989+Damian-Nordic@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Andrei Litvin <andrei@andy314.com>
Co-authored-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
@andy31415 andy31415 deleted the 01_pragma_once_large branch October 28, 2020 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace include header guards with pragma once
4 participants