@@ -1823,7 +1823,7 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString,
18231823 int i = 0 ;
18241824 finalString << " \n // Schema evolution read functions\n " ;
18251825 std::list<ROOT::SchemaRuleMap_t>::iterator rIt = rulesIt1->second .fRules .begin ();
1826- while ( rIt != rulesIt1->second .fRules .end () ) {
1826+ while ( rIt != rulesIt1->second .fRules .end ()) {
18271827
18281828 // --------------------------------------------------------------------
18291829 // Check if the rules refer to valid data members
@@ -1858,7 +1858,7 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString,
18581858 int i = 0 ;
18591859 finalString << " \n // Schema evolution read raw functions\n " ;
18601860 std::list<ROOT::SchemaRuleMap_t>::iterator rIt = rulesIt2->second .fRules .begin ();
1861- while ( rIt != rulesIt2->second .fRules .end () ) {
1861+ while ( rIt != rulesIt2->second .fRules .end ()) {
18621862
18631863 // --------------------------------------------------------------------
18641864 // Check if the rules refer to valid data members
@@ -2052,14 +2052,14 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString,
20522052
20532053 if ( rulesIt1 != ROOT::gReadRules .end () ) {
20542054 finalString << " \n " << " // the io read rules" << " \n " << " std::vector<::ROOT::Internal::TSchemaHelper> readrules(" << rulesIt1->second .size () << " );" << " \n " ;
2055- ROOT::WriteSchemaList ( rulesIt1->second .fRules , " readrules" , finalString );
2055+ ROOT::WriteSchemaList (rulesIt1->second .fRules , " readrules" , finalString);
20562056 finalString << " instance.SetReadRules( readrules );" << " \n " ;
20572057 rulesIt1->second .fGenerated = true ;
20582058 }
20592059
20602060 if ( rulesIt2 != ROOT::gReadRawRules .end () ) {
20612061 finalString << " \n " << " // the io read raw rules" << " \n " << " std::vector<::ROOT::Internal::TSchemaHelper> readrawrules(" << rulesIt2->second .size () << " );" << " \n " ;
2062- ROOT::WriteSchemaList ( rulesIt2->second .fRules , " readrawrules" , finalString );
2062+ ROOT::WriteSchemaList (rulesIt2->second .fRules , " readrawrules" , finalString);
20632063 finalString << " instance.SetReadRawRules( readrawrules );" << " \n " ;
20642064 rulesIt2->second .fGenerated = true ;
20652065 }
@@ -2193,19 +2193,17 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString,
21932193
21942194void ROOT::TMetaUtils::WriteStandaloneReadRules (std::ostream &finalString, bool rawrules,
21952195 std::vector<std::string> &standaloneTargets,
2196- const cling::Interpreter& interp)
2196+ const cling::Interpreter & interp)
21972197{
2198- for (auto &rulesIt1 : rawrules? ROOT::gReadRawRules : ROOT::gReadRules ) {
2198+ for (auto &rulesIt1 : rawrules ? ROOT::gReadRawRules : ROOT::gReadRules ) {
21992199 if (!rulesIt1.second .fGenerated ) {
22002200 const clang::Type *typeptr = nullptr ;
2201- const clang::CXXRecordDecl *target
2202- = ROOT::TMetaUtils::ScopeSearch (rulesIt1.first .c_str (), interp,
2203- true /* diag*/ , &typeptr);
2204-
2201+ const clang::CXXRecordDecl *target =
2202+ ROOT::TMetaUtils::ScopeSearch (rulesIt1.first .c_str (), interp, true /* diag*/ , &typeptr);
22052203
22062204 if (!target && !rulesIt1.second .fTargetDecl ) {
22072205 ROOT::TMetaUtils::Warning (nullptr , " %d Rule(s) for target class %s was not used!\n " , rulesIt1.second .size (),
2208- rulesIt1.first .c_str ());
2206+ rulesIt1.first .c_str ());
22092207 continue ;
22102208 }
22112209
@@ -2256,8 +2254,7 @@ void ROOT::TMetaUtils::WriteStandaloneReadRules(std::ostream &finalString, bool
22562254 }
22572255}
22582256
2259- void ROOT::TMetaUtils::WriteRulesRegistration (std::ostream &finalString,
2260- const std::string &dictName,
2257+ void ROOT::TMetaUtils::WriteRulesRegistration (std::ostream &finalString, const std::string &dictName,
22612258 const std::vector<std::string> &standaloneTargets)
22622259{
22632260 std::string functionname (" RecordReadRules_" );
@@ -2267,35 +2264,39 @@ void ROOT::TMetaUtils::WriteRulesRegistration(std::ostream &finalString,
22672264 finalString << " // Registration Schema evolution read functions\n " ;
22682265 finalString << " int " << functionname << " () {" << " \n " ;
22692266 if (!standaloneTargets.empty ())
2270- finalString << " \n " << " ::ROOT::Internal::TSchemaHelper* rule; " << " \n " ;
2271- for ( const auto &target : standaloneTargets)
2272- {
2267+ finalString << " \n "
2268+ << " ::ROOT::Internal::TSchemaHelper* rule; " << " \n " ;
2269+ for ( const auto &target : standaloneTargets) {
22732270 std::string name;
22742271 TClassEdit::GetNormalizedName (name, target);
22752272
2276- ROOT::SchemaRuleClassMap_t::iterator rulesIt1 = ROOT::gReadRules .find ( target.c_str () );
2273+ ROOT::SchemaRuleClassMap_t::iterator rulesIt1 = ROOT::gReadRules .find (target.c_str ());
22772274 finalString << " {\n " ;
22782275 if (rulesIt1 != ROOT::gReadRules .end ()) {
22792276 finalString << " // the io read rules for " << target << " \n " ;
2280- finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrules(" << rulesIt1->second .size () << " );" << " \n " ;
2281- ROOT::WriteSchemaList ( rulesIt1->second .fRules , " readrules" , finalString );
2282- finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRule, \" " << name << " \" , std::move(readrules));\n " ;
2277+ finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrules(" << rulesIt1->second .size ()
2278+ << " );" << " \n " ;
2279+ ROOT::WriteSchemaList (rulesIt1->second .fRules , " readrules" , finalString);
2280+ finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRule, \" " << name
2281+ << " \" , std::move(readrules));\n " ;
22832282 rulesIt1->second .fGenerated = true ;
22842283 }
2285- ROOT::SchemaRuleClassMap_t::iterator rulesIt2 = ROOT::gReadRawRules .find ( target.c_str () );
2284+ ROOT::SchemaRuleClassMap_t::iterator rulesIt2 = ROOT::gReadRawRules .find (target.c_str ());
22862285 if (rulesIt2 != ROOT::gReadRawRules .end ()) {
22872286 finalString << " \n // the io read raw rules for " << target << " \n " ;
2288- finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrawrules(" << rulesIt2->second .size () << " );" << " \n " ;
2289- ROOT::WriteSchemaList ( rulesIt2->second .fRules , " readrawrules" , finalString );
2290- finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRawRule, \" " << name << " \" , std::move(readrawrules));\n " ;
2287+ finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrawrules(" << rulesIt2->second .size ()
2288+ << " );" << " \n " ;
2289+ ROOT::WriteSchemaList (rulesIt2->second .fRules , " readrawrules" , finalString);
2290+ finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRawRule, \" " << name
2291+ << " \" , std::move(readrawrules));\n " ;
22912292 rulesIt2->second .fGenerated = true ;
22922293 }
22932294 finalString << " }\n " ;
22942295 }
22952296 finalString << " return 0;\n " ;
22962297 finalString << " }\n " ;
22972298 finalString << " static int _R__UNIQUE_DICT_(ReadRules_" << dictName << " ) = " << functionname << " ();" ;
2298- finalString<< " R__UseDummy(_R__UNIQUE_DICT_(ReadRules_" << dictName << " ));" << " \n " ;
2299+ finalString << " R__UseDummy(_R__UNIQUE_DICT_(ReadRules_" << dictName << " ));" << " \n " ;
22992300 finalString << " } // namespace ROOT" << " \n " ;
23002301}
23012302
0 commit comments