-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
chore: unsingletonize Resources/Resources2 #5460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'resources' is a static definition in anonymous namespace; static is redundant here [readability-static-definition-in-anonymous-namespace]
static Resources2 *resources = nullptr; | |
Resources2 *resources = nullptr; |
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for global variable 'resources' [readability-identifier-naming]
static Resources2 *resources = nullptr; | |
static Resources2 *RESOURCES = nullptr; |
src/singletons/Resources.cpp:16:
- assert(resources);
+ assert(RESOURCES);
src/singletons/Resources.cpp:18:
- return *resources;
+ return *RESOURCES;
src/singletons/Resources.cpp:25:
- resources = new Resources2;
+ RESOURCES = new Resources2;
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'resources' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
static Resources2 *resources = nullptr;
^
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'resources' provides global access to a non-const object; consider making the pointed-to data 'const' [cppcoreguidelines-avoid-non-const-global-variables]
static Resources2 *resources = nullptr;
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'resources' is a static definition in anonymous namespace; static is redundant here [readability-static-definition-in-anonymous-namespace]
static Resources2 *resources = nullptr; | |
Resources2 *resources = nullptr; |
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: invalid case style for global variable 'resources' [readability-identifier-naming]
static Resources2 *resources = nullptr; | |
static Resources2 *RESOURCES = nullptr; |
src/singletons/Resources.cpp:16:
- assert(resources);
+ assert(RESOURCES);
src/singletons/Resources.cpp:18:
- return *resources;
+ return *RESOURCES;
src/singletons/Resources.cpp:25:
- resources = new Resources2;
+ RESOURCES = new Resources2;
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'resources' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
static Resources2 *resources = nullptr;
^
|
||
using namespace chatterino; | ||
|
||
static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'resources' provides global access to a non-const object; consider making the pointed-to data 'const' [cppcoreguidelines-avoid-non-const-global-variables]
static Resources2 *resources = nullptr;
^
No description provided.