Repository navigation
chore: unsingletonize Resources/Resources2 - #5460
Conversation
|
|
||
| using namespace chatterino; | ||
|
|
||
| static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
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.
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.
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.
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;
^|
|
||
| using namespace chatterino; | ||
|
|
||
| static Resources2 *resources = nullptr; |
There was a problem hiding this comment.
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.
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.
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.
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.