diff options
author | David Robillard <d@drobilla.net> | 2012-08-14 14:36:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-14 14:36:51 +0000 |
commit | a8312be2d849b73ff0acc80a226095bcfee3556c (patch) | |
tree | bb5d7de6c3fd8b5ac121ec023e46a90ddc24abb0 /src/serialisation | |
parent | 50f85edbd0f07135eb73201367bbd256792ee999 (diff) | |
download | ingen-a8312be2d849b73ff0acc80a226095bcfee3556c.tar.gz ingen-a8312be2d849b73ff0acc80a226095bcfee3556c.tar.bz2 ingen-a8312be2d849b73ff0acc80a226095bcfee3556c.zip |
Saner/faster Store interface for finding children.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4694 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r-- | src/serialisation/Serialiser.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index a6af8923..d71e7b15 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -98,13 +98,12 @@ struct Serialiser::Impl { std::string finish(); - Raul::Path _root_path; - SharedPtr<Store> _store; - Mode _mode; - std::string _base_uri; - World& _world; - Sord::Model* _model; - Sratom* _sratom; + Raul::Path _root_path; + Mode _mode; + std::string _base_uri; + World& _world; + Sord::Model* _model; + Sratom* _sratom; }; Serialiser::Serialiser(World& world) @@ -353,9 +352,8 @@ Serialiser::Impl::serialise_patch(SharedPtr<const GraphObject> patch, const GraphObject::Properties props = patch->properties(Resource::INTERNAL); serialise_properties(patch_id, props); - for (Store::const_iterator n = _world.store()->children_begin(patch); - n != _world.store()->children_end(patch); ++n) { - + const Store::const_range kids = _world.store()->children_range(patch); + for (Store::const_iterator n = kids.first; n != kids.second; ++n) { if (n->first.parent() != patch->path()) continue; |