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

BMCWEB has several non-const global variables #185

Open
edtanous opened this issue Feb 18, 2021 · 0 comments
Open

BMCWEB has several non-const global variables #185

edtanous opened this issue Feb 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@edtanous
Copy link
Contributor

bmcweb as a design goal should try to have no non-const global variables. Most of these variables can be thought of as general application state, and should be put in the App object. We used global variables initially because we didn't have access to modify the App object, as it was a template that individual callers didn't have access to without also being a template.

But times have changed, and that issue has been fixed, so we can now just directly call to and from app when making our requests. One such example of a non-const, nontrivial global variable is in the websocket monitor class:

static boost::container::flat_map<crow::websocket::Connection*,

@edtanous edtanous added the enhancement New feature or request label Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant