diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2015-10-10 14:03:39 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2015-10-10 14:03:39 -0700 |
commit | 2443500c8f002df2641e55c26a6a7882906a42da (patch) | |
tree | 1ca6f525b49ba9dad6b7ea0cf95149238cb89e75 /ldid.cpp | |
parent | 2dcf3fafab0837918911f68460d0d43447d30b94 (diff) | |
download | ldid-2443500c8f002df2641e55c26a6a7882906a42da.tar.gz ldid-2443500c8f002df2641e55c26a6a7882906a42da.tar.zst ldid-2443500c8f002df2641e55c26a6a7882906a42da.zip |
SubFolder should take a reference (not a pointer).
Diffstat (limited to 'ldid.cpp')
-rw-r--r-- | ldid.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1643,22 +1643,22 @@ void DiskFolder::Find(const std::string &path, const Functor<void (const std::st Find(path, "", code); } -SubFolder::SubFolder(Folder *parent, const std::string &path) : +SubFolder::SubFolder(Folder &parent, const std::string &path) : parent_(parent), path_(path) { } void SubFolder::Save(const std::string &path, const Functor<void (std::streambuf &)> &code) { - return parent_->Save(path_ + path, code); + return parent_.Save(path_ + path, code); } bool SubFolder::Open(const std::string &path, const Functor<void (std::streambuf &)> &code) { - return parent_->Open(path_ + path, code); + return parent_.Open(path_ + path, code); } void SubFolder::Find(const std::string &path, const Functor<void (const std::string &, const Functor<void (const Functor<void (std::streambuf &, std::streambuf &)> &)> &)> &code) { - return parent_->Find(path_ + path, code); + return parent_.Find(path_ + path, code); } static size_t copy(std::streambuf &source, std::streambuf &target) { @@ -1837,7 +1837,7 @@ std::string Bundle(const std::string &root, Folder &folder, const std::string &k if (!nested(name)) return; auto bundle(root + Split(name).dir); - SubFolder subfolder(&folder, bundle); + SubFolder subfolder(folder, bundle); Bundle(bundle, subfolder, key, local); })); |