[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [koffice] filters/kcells/excel/sidewinder: Use const-ref in foreach
From: "Dr. Robert Marmorstein" <robert () narnia ! homeunix ! com>
Date: 2011-08-03 8:25:22
Message-ID: 20110803082522.3F610A60A6 () git ! kde ! org
[Download RAW message or body]
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<MSO::OfficeArtSpContainer>() << " isOfficeArtSpgrContainer=" << \
b.anon.is<MSO::OfficeArtSpgrContainer>() << " isOfficeArtFSP=" << \
b.anon.is<MSO::OfficeArtFSP>() << " isOfficeArtFSPGR=" << \
b.anon.is<MSO::OfficeArtFSPGR>() << " isOfficeArtClientAnchor=" << \
b.anon.is<MSO::OfficeArtClientAnchor>() << " isOfficeArtClientData=" << \
b.anon.is<MSO::OfficeArtClientData>() << std::endl;
- MSO::OfficeArtSpContainer* spc = \
b.anon.get<MSO::OfficeArtSpContainer>(); + const \
MSO::OfficeArtSpContainer* spc = b.anon.get<MSO::OfficeArtSpContainer>(); \
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<MSO::OfficeArtSpgrContainer>(); + const \
MSO::OfficeArtSpgrContainer* spgr = \
b.anon.get<MSO::OfficeArtSpgrContainer>(); if(spgr) {
- foreach(MSO::OfficeArtSpgrContainerFileBlock b, spgr->rgfb) {
+ foreach(const MSO::OfficeArtSpgrContainerFileBlock &b, \
spgr->rgfb) { std::cout << " spgr isOfficeArtSpContainer=" << \
b.anon.is<MSO::OfficeArtSpContainer>() << " isOfficeArtSpgrContainer=" << \
b.anon.is<MSO::OfficeArtSpgrContainer>() << " isOfficeArtFSP=" << \
b.anon.is<MSO::OfficeArtFSP>() << " isOfficeArtFSPGR=" << \
b.anon.is<MSO::OfficeArtFSPGR>() << " isOfficeArtClientAnchor=" << \
b.anon.is<MSO::OfficeArtClientAnchor>() << " isOfficeArtClientData=" << \
b.anon.is<MSO::OfficeArtClientData>() << std::endl;
- MSO::OfficeArtSpContainer* spc2 = \
b.anon.get<MSO::OfficeArtSpContainer>(); + const \
MSO::OfficeArtSpContainer* spc2 = b.anon.get<MSO::OfficeArtSpContainer>(); \
if(spc2) { std::cout << " sp"
<< " shapeGroup=" << (spc2->shapeGroup?1:0)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic