Git commit 42f572be20e4dbb0221493f0aad862190cb89cd8 by Dr. Robert Marmorstein. Committed on 02/08/2011 at 11:29. Pushed by robertm into branch 'master'. Use const-ref in foreach in sidewinder filter. Makes krazy happy and might slightly improver performance. M +5 -5 filters/kcells/excel/sidewinder/objects.cpp http://commits.kde.org/koffice/42f572be20e4dbb0221493f0aad862190cb89cd8 diff --git a/filters/kcells/excel/sidewinder/objects.cpp b/filters/kcells/excel/sidewinder/objects.cpp index f6604eb..e965f88 100644 --- a/filters/kcells/excel/sidewinder/objects.cpp +++ b/filters/kcells/excel/sidewinder/objects.cpp @@ -49,9 +49,9 @@ bool Object::applyDrawing(const MSO::OfficeArtDgContainer &container) { bool ok = false; - foreach(MSO::OfficeArtSpgrContainerFileBlock b, container.groupShape->rgfb) { + foreach(const MSO::OfficeArtSpgrContainerFileBlock &b, container.groupShape->rgfb) { std::cout << "Object(" << m_type << ") isOfficeArtSpContainer=" << b.anon.is() << " isOfficeArtSpgrContainer=" << b.anon.is() << " isOfficeArtFSP=" << b.anon.is() << " isOfficeArtFSPGR=" << b.anon.is() << " isOfficeArtClientAnchor=" << b.anon.is() << " isOfficeArtClientData=" << b.anon.is() << std::endl; - MSO::OfficeArtSpContainer* spc = b.anon.get(); + const MSO::OfficeArtSpContainer* spc = b.anon.get(); if(spc && spc->shapePrimaryOptions) { // Extract the unique identifier for the drawing to be able to access the drawing again from outside. @@ -79,11 +79,11 @@ bool Object::applyDrawing(const MSO::OfficeArtDgContainer &container) continue; } - MSO::OfficeArtSpgrContainer* spgr = b.anon.get(); + const MSO::OfficeArtSpgrContainer* spgr = b.anon.get(); if(spgr) { - foreach(MSO::OfficeArtSpgrContainerFileBlock b, spgr->rgfb) { + foreach(const MSO::OfficeArtSpgrContainerFileBlock &b, spgr->rgfb) { std::cout << " spgr isOfficeArtSpContainer=" << b.anon.is() << " isOfficeArtSpgrContainer=" << b.anon.is() << " isOfficeArtFSP=" << b.anon.is() << " isOfficeArtFSPGR=" << b.anon.is() << " isOfficeArtClientAnchor=" << b.anon.is() << " isOfficeArtClientData=" << b.anon.is() << std::endl; - MSO::OfficeArtSpContainer* spc2 = b.anon.get(); + const MSO::OfficeArtSpContainer* spc2 = b.anon.get(); if(spc2) { std::cout << " sp" << " shapeGroup=" << (spc2->shapeGroup?1:0)