@@ -1032,8 +1032,8 @@ namespace folia {
10321032 }
10331033 // we must check wref children against the parent too
10341034 vector<WordReference*> wrefs = select<WordReference>();
1035- for ( const auto & refs : wrefs ){
1036- FoliaElement *ref = refs->ref ();
1035+ for ( const auto * refs : wrefs ){
1036+ const FoliaElement *ref = refs->ref ();
10371037 string tval = refs->tval ();
10381038 if ( !tval.empty () ){
10391039 string watt = ref->str (parent->textclass ());
@@ -1500,15 +1500,15 @@ namespace folia {
15001500 return true ;
15011501 }
15021502 if ( !_tval.empty () ){
1503- string watt = _ref ->str (parent->textclass ());
1503+ string watt = _reference ->str (parent->textclass ());
15041504 if ( watt.empty () ){
15051505 string msg = " no matching 't' value found in the '<w>' refered by "
1506- " <wref id=\" " + _ref ->id () + " \" t=\" " + _tval
1506+ " <wref id=\" " + _reference ->id () + " \" t=\" " + _tval
15071507 + " \" > for textclass '" + parent->textclass () + " '" ;
15081508 throw XmlError ( this , msg );
15091509 }
15101510 else if ( watt != _tval ){
1511- string msg = " the 't' value of <wref id=\" " + _ref ->id ()
1511+ string msg = " the 't' value of <wref id=\" " + _reference ->id ()
15121512 + " \" t=\" " + _tval + " \" > for textclass '" + parent->textclass ()
15131513 + " ' doesn't match any value of the refered word for that class" ;
15141514 throw XmlError ( this , msg );
@@ -1537,30 +1537,30 @@ namespace folia {
15371537 throw XmlError ( this ,
15381538 " unsupported attribute(s) in wref: " + toString (atts) );
15391539 }
1540- FoliaElement *ref = (*doc ())[id];
1541- if ( ref ) {
1542- if ( !ref ->referable () ){
1540+ FoliaElement *the_ref = (*doc ())[id];
1541+ if ( the_ref ) {
1542+ if ( !the_ref ->referable () ){
15431543 throw XmlError ( this ,
15441544 " WordReference id=" + id + " refers to a non-referable word: "
1545- + ref ->xmltag () );
1545+ + the_ref ->xmltag () );
15461546 }
1547- ref ->increfcount ();
1547+ the_ref ->increfcount ();
15481548 }
15491549 else {
15501550 throw XmlError ( this ,
15511551 " Unresolvable id " + id + " in WordReference" );
15521552 }
1553- _ref = ref ;
1553+ _reference = the_ref ;
15541554 return this ;
15551555 }
15561556
15571557 xmlNode *WordReference::xml ( bool , bool ) const {
15581558 // / convert the WordReference to an xmlNode
15591559 xmlNode *e = AbstractElement::xml ( false , false );
15601560 KWargs attribs;
1561- attribs.add (" id" ,_ref ->id ());
1561+ attribs.add (" id" ,_reference ->id ());
15621562 try {
1563- string txt = _ref ->str (_ref ->textclass ());
1563+ string txt = _reference ->str (_reference ->textclass ());
15641564 attribs.add (" t" ,txt);
15651565 }
15661566 catch (...){};
@@ -2690,7 +2690,7 @@ namespace folia {
26902690 vector<FoliaElement*> res;
26912691 for ( const auto & el : data () ) {
26922692 if ( el->isinstance <WordReference>() ){
2693- res.push_back ( dynamic_cast <WordReference*>(el)->_ref );
2693+ res.push_back ( dynamic_cast <WordReference*>(el)->_reference );
26942694 }
26952695 else if ( el->referable () ){
26962696 res.push_back ( el );
0 commit comments