From: Michal H. <ms...@gm...> - 2008-01-18 11:28:33
|
Here is the patch for cannotations.cc agains trunk > Index: cannotation.cc > =================================================================== > RCS file: /cvsroot/pdfedit/pdfedit/src/kernel/cannotation.cc,v > retrieving revision 1.13 > retrieving revision 1.13.2.1 > diff -u -p -r1.13 -r1.13.2.1 > --- cannotation.cc 16 Jan 2008 13:50:27 -0000 1.13 > +++ cannotation.cc 18 Jan 2008 00:36:05 -0000 1.13.2.1 > @@ -9,6 +9,7 @@ > */ > // vim:tabstop=4:shiftwidth=4:noexpandtab:textwidth=80 > > +#include "kernel/static.h" > #include"kernel/cannotation.h" > #include"utils/debug.h" > #include"kernel/factories.h" > @@ -215,7 +216,7 @@ bool LinkAnnotInitializer::operator()(bo > shared_ptr<utils::IAnnotInitializator> > CAnnotation::annotInit=shared_ptr<utils::IAnnotInitializator>(new utils::UniversalAnnotInitializer()); > > -shared_ptr<CAnnotation> CAnnotation::createAnnotation(Rectangle rect, string annotType) > +shared_ptr<CAnnotation> CAnnotation::createAnnotation(libs::Rectangle rect, string annotType) > { > using namespace debug; > using namespace utils; > @@ -289,7 +290,7 @@ using namespace debug; > string typeName; > subTypeName->getValue(typeName); > return utils::annotTypeMapping(typeName); > - }catch(ElementNotFoundException & e) > + }catch(ElementNotFoundException &) > { > // Subtype field not present > kernelPrintDbg(DBG_WARN, "Annotation dictionary doesn't contain Subtype field."); > --- Is there any special reason why the e parameter was added here? We don't use this parameter in the catch block... This change is also in other places. I don't have any objections, just want to know the reason. Is the previous code bad or it is kind of state of art? -- Michal Hocko |