summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-perspective_path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/lpe-perspective_path.cpp')
-rw-r--r--src/live_effects/lpe-perspective_path.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index 6857d4363..cb4e43d87 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -102,12 +102,12 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) {
perspectiveID = perspective->get_text();
Persp3D *first = 0;
Persp3D *persp = 0;
- for ( SPObject *child = this->lpeobj->document->getDefs()->firstChild(); child && !persp; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child) && first == 0) {
- first = SP_PERSP3D(child);
+ for (auto& child: lpeobj->document->getDefs()->children) {
+ if (SP_IS_PERSP3D(&child) && first == 0) {
+ first = SP_PERSP3D(&child);
}
- if (SP_IS_PERSP3D(child) && strcmp(child->getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
- persp = SP_PERSP3D(child);
+ if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
+ persp = SP_PERSP3D(&child);
break;
}
}