From ab420f25e2dec25227844d356de45a82a2369fd3 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 26 Oct 2008 20:02:26 +0000 Subject: [PATCH] Make Canvas::find_canvas() and Canvas::surefind_canvas() look more alike. No functional change here. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2136 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/canvas.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp index 5592aa0..b02053c 100644 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ b/synfig-core/trunk/src/synfig/canvas.cpp @@ -596,7 +596,8 @@ Canvas::find_canvas(const String &id) Canvas::ConstHandle Canvas::find_canvas(const String &id)const { - if(is_inline() && parent_)return parent_->find_canvas(id); + if(is_inline() && parent_) + return parent_->find_canvas(id); if(id.empty()) return this; @@ -654,7 +655,7 @@ Canvas::find_canvas(const String &id)const // If the first character is the separator, then // this references the root canvas. - if(id.find_first_of(':')==0) + if(id[0]==':') return get_root()->find_canvas(string(id,1)); // Now we know that the requested Canvas is in a child -- 2.7.4