From: Philippe Canal Date: Wed, 21 Jan 2015 23:44:48 +0000 (-0600) Subject: Avoid pinning a rule to a skipped data member X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=c808769d8408f41ce237a096fc84d1f6595a5cc4 Avoid pinning a rule to a skipped data member --- diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx index b19856f..e0af936 100644 --- a/io/io/src/TStreamerInfo.cxx +++ b/io/io/src/TStreamerInfo.cxx @@ -4304,6 +4304,15 @@ void TStreamerInfo::InsertArtificialElements(const TObjArray *rules) } } if (loc == -1) { + // Verify if the last one is not 'skipped'. + for(Int_t i = fElements->GetLast(); i >= 0 && (i+1) >= loc; --i) { + if ( ((TStreamerElement*)fElements->UncheckedAt(i))->GetNewType() != -2 ) { + break; + } + loc = i; + } + } + if (loc == -1) { for(vec_t::iterator iter = toAdd.begin(); iter != toAdd.end(); ++iter) { fElements->Add(*iter); }