[Libreoffice] [PATCH] fix soltools build with svn gcc
Tom Tromey
tromey at redhat.com
Wed Aug 10 08:59:05 PDT 2011
I tried building LibreOffice with svn trunk gcc.
It dies in soltools with:
Compiling: soltools/giparser/gi_list.cxx
In file included from ../inc/gi_list.hxx:33:0,
from /home/tromey/Space/LibreOffice/bootstrap/soltools/giparser/gi_list.cxx:33:
../inc/st_list.hxx: In instantiation of 'DynamicList<XY>& DynamicList<XY>::operator=(const DynamicList<XY>&) [with XY = GenericInfo]':
/home/tromey/Space/LibreOffice/bootstrap/soltools/giparser/gi_list.cxx:59:25: required from here
../inc/st_list.hxx:298:10: error: 'push_back' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../inc/st_list.hxx:298:10: note: declarations in dependent base 'ST_List<GenericInfo*>' are not found by unqualified lookup
../inc/st_list.hxx:298:10: note: use 'this->push_back' instead
../inc/st_list.hxx: In instantiation of 'void DynamicList<XY>::Insert(unsigned int, XY* const&) [with XY = GenericInfo]':
/home/tromey/Space/LibreOffice/bootstrap/soltools/giparser/gi_list.cxx:234:1: required from here
../inc/st_list.hxx:311:5: error: 'checkSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../inc/st_list.hxx:311:5: note: declarations in dependent base 'ST_List<GenericInfo*>' are not found by unqualified lookup
../inc/st_list.hxx:311:5: note: use 'this->checkSize' instead
The appended patch fixes this problem by adding 'this->' qualifiers.
This is contributed under the LGPLv3+/MPL.
Tom
diff --git a/soltools/inc/st_list.hxx b/soltools/inc/st_list.hxx
index 51f0a32..69b6943 100644
--- a/soltools/inc/st_list.hxx
+++ b/soltools/inc/st_list.hxx
@@ -295,7 +295,7 @@ DynamicList<XY>::operator=( const DynamicList<XY> & i_rList )
it != i_rList.end();
++it )
{
- push_back( new XY(*(*it)) );
+ this->push_back( new XY(*(*it)) );
}
return *this;
}
@@ -308,7 +308,7 @@ DynamicList<XY>::Insert(unsigned pos, XY * const & elem_)
if ( pos > this->len )
return;
- checkSize(DynamicList<XY>::len+2);
+ this->checkSize(DynamicList<XY>::len+2);
memmove( DynamicList<XY>::inhalt+pos+1, DynamicList<XY>::inhalt+pos, (DynamicList<XY>::len-pos) * sizeof(XY*) );
this->inhalt[pos] = elem_;
this->len++;
More information about the LibreOffice
mailing list