File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ Checks: >
1919 -readability-use-anyofallof,
2020 -readability-redundant-access-specifiers,
2121 -readability-convert-member-functions-to-static,
22- -cppcoreguidelines-avoid-const-or-ref-data-members
22+ -cppcoreguidelines-avoid-const-or-ref-data-members,
23+ -cppcoreguidelines-pro-bounds-constant-array-index
2324
2425CheckOptions :
2526 - key : misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
Original file line number Diff line number Diff line change @@ -61,14 +61,13 @@ namespace geode
6161 {
6262 const auto & type = typeid ( SingletonType );
6363 const std::lock_guard< std::mutex > locking{ lock () };
64- auto * singleton =
65- dynamic_cast < SingletonType* >( instance ( type ) );
64+ auto * singleton = instance ( type );
6665 if ( singleton == nullptr )
6766 {
6867 singleton = new SingletonType{};
6968 set_instance ( type, singleton );
7069 }
71- return *singleton;
70+ return *static_cast < SingletonType* >( singleton ) ;
7271 }
7372
7473 private:
You can’t perform that action at this time.
0 commit comments