Apache OpenOffice (AOO) Bugzilla – Issue 31733
static_casts problematic with Forte C++ 6 Update 2
Last modified: 2004-07-24 20:17:16 UTC
Hi, this issue is manual-split from #i30346#. I'm doing build QA on ooo20040704 with Forte 6 Update 2 which was successfully used to build 1.1.2. The build ends with Error: Cannot cast away const or volatile. (see #i30346# for discussion about it). The attached patch fixes the build for me.
Created attachment 16590 [details] Remove static_casts
set target
cp->hdu: Please have a look at it since Philipp is on vacation. afaik a static_cast really cannot cast away const, you need a const_cast for that. But Is there really a need for a const iterator ? It might be more elegant to leave the static_cast untouched but to change the iterator. As said, please have a look.
Yes, replacing the responsible const_iterators by their non-const counterparts is the cleaner solution.
Using non-const iterators wasn't always possible, but solvable anyway. HDU->PJANIK: since I don't have the exactly same compiler available here, please check revision 1.56.12.2 of vcl/unx/source/app/saldisp.cxx revision 1.180.12.1 of vcl/unx/source/window/salframe.cxx
Verified, closing.