@@ -19,9 +19,9 @@ namespace api {
1919// these values until g_redex exists and the classes have been loaded from the
2020// dex file
2121int32_t LevelChecker::s_min_level = 0 ;
22- DexType* LevelChecker::s_requires_api_old = nullptr ;
23- DexType* LevelChecker::s_requires_api_new = nullptr ;
24- DexType* LevelChecker::s_target_api = nullptr ;
22+ const DexType* LevelChecker::s_requires_api_old = nullptr ;
23+ const DexType* LevelChecker::s_requires_api_new = nullptr ;
24+ const DexType* LevelChecker::s_target_api = nullptr ;
2525bool LevelChecker::s_has_been_init = false ;
2626
2727void LevelChecker::init (int32_t min_level, const Scope& scope) {
@@ -112,7 +112,7 @@ DexClass* LevelChecker::get_outer_class(const DexClass* cls) {
112112 if (slash_idx == std::string::npos || slash_idx < cash_idx) {
113113 // there's a $ in the class name
114114 const std::string& outer_name = cls_name.substr (0 , cash_idx) + ' ;' ;
115- DexType* outer = DexType::get_type (outer_name);
115+ const DexType* outer = DexType::get_type (outer_name);
116116 if (outer == nullptr ) {
117117 TRACE (MMINL , 4 , " Can't find outer class! %.*s -> %s" ,
118118 static_cast <int >(cls_name.length ()), cls_name.data (),
@@ -163,7 +163,7 @@ void propagate_levels(const ClassHierarchy& ch,
163163
164164 auto * intfs = cls->get_interfaces ();
165165 if (intfs != nullptr ) {
166- for (auto * intf : *intfs) {
166+ for (const auto * intf : *intfs) {
167167 auto * intf_cls = type_class (intf);
168168 if (intf_cls != nullptr ) {
169169 min_level = std::max (
0 commit comments