On 04/18/2012 04:49 PM, Timothy Pearson wrote:
What say
the experts. Is my reading of which 'it' can be renamed
correct?
Yes, you are correct. When dealing with these problems, I look at the way
gcc treated the variable's scope before the change; i.e. within a given
scope (usually a set of curly braces, though there are other ways to
create a temporary scope) once the new "it" object was created, all
accesses to "it" until the end of the current scope (excluding new scopes
within the current scope) are going to be treated as accessing the new
"it" object.
Confused yet? :-)
Tim
Yes,
But, please with progress. Before this fix, tdepim failed at 30%, not it
builds all the way to 70%!
[ 70%] Building CXX object
korganizer/korgac/CMakeFiles/korgac.dir/alarmdialog.cpp.o
cd /build/src/build/korganizer/korgac && /usr/bin/c++ -D_FILE_OFFSET_BITS=64
-DHAVE_CONFIG_H -fpermissive -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE
-DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT
-D_REENTRANT -include tqt.h -I/build/src/build/korganizer/korgac
-I/build/src/tdepim -I/build/src/tdepim/korganizer
-I/build/src/tdepim/libtdepim -I/opt/trinity/include -I/opt/tqt3/include
-I/usr/include/tqt -o CMakeFiles/korgac.dir/alarmdialog.cpp.o -c
/build/src/tdepim/korganizer/korgac/alarmdialog.cpp
/build/src/tdepim/korganizer/korgac/alarmdialog.cpp: In member function 'void
AlarmDialog::eventNotification()':
/build/src/tdepim/korganizer/korgac/alarmdialog.cpp:501:32: error:
redeclaration of 'TQValueList<KCal::Alarm*>::ConstIterator it'
/build/src/tdepim/korganizer/korgac/alarmdialog.cpp:489:32: error:
'TQListViewItemIterator it' previously declared here
Damn, this is starting to look familiar! I'll apply that same logic to this
one and keep going...
--
David C. Rankin, J.D.,P.E.