commit 7d36b9e4fa89e804ca7cf07daf81eec817e6b21d
Author: Richard Kimberly Heck <[email protected]>
Date:   Sat Apr 25 22:27:09 2020 -0400

    Remove method that is now unneeded.
---
 src/Buffer.cpp              |    6 +++---
 src/insets/InsetInclude.cpp |   10 ++--------
 src/insets/InsetInclude.h   |    7 +++----
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 8b5fae1..0cc1d23 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -3017,7 +3017,7 @@ void Buffer::dispatch(FuncRequest const & func, 
DispatchResult & dr)
                                // get buffer of external file
                                InsetInclude const & ins =
                                        static_cast<InsetInclude const &>(*it);
-                               Buffer * child = ins.getChildBuffer();
+                               Buffer * child = ins.loadIfNeeded();
                                if (!child)
                                        continue;
                                child->dispatch(func, dr);
@@ -3805,7 +3805,7 @@ void Buffer::Impl::updateMacros(DocIterator & it, 
DocIterator & scope)
                                InsetInclude const & incinset =
                                        static_cast<InsetInclude const 
&>(*insit.inset);
                                macro_lock = true;
-                               Buffer * child = incinset.getChildBuffer();
+                               Buffer * child = incinset.loadIfNeeded();
                                macro_lock = false;
                                if (!child)
                                        continue;
@@ -3900,7 +3900,7 @@ void Buffer::getUsedBranches(std::list<docstring> & 
result, bool const from_mast
                        // get buffer of external file
                        InsetInclude const & ins =
                                static_cast<InsetInclude const &>(*it);
-                       Buffer * child = ins.getChildBuffer();
+                       Buffer * child = ins.loadIfNeeded();
                        if (!child)
                                continue;
                        child->getUsedBranches(result, true);
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index be823a7..6dca350 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -446,12 +446,6 @@ docstring InsetInclude::screenLabel() const
 }
 
 
-Buffer * InsetInclude::getChildBuffer() const
-{
-       return loadIfNeeded();
-}
-
-
 Buffer * InsetInclude::loadIfNeeded() const
 {
        // This is for background export and preview. We don't even want to
@@ -1330,7 +1324,7 @@ void InsetInclude::addToToc(DocIterator const & cpit, 
bool output_active,
                b.pushItem(cpit, screenLabel(), output_active);
                b.pop();
        } else {
-               Buffer const * const childbuffer = getChildBuffer();
+               Buffer const * const childbuffer = loadIfNeeded();
 
                TocBuilder & b = backend.builder("child");
                docstring str = childbuffer ? 
childbuffer->fileName().displayName()
@@ -1386,7 +1380,7 @@ void InsetInclude::updateCommand()
 void InsetInclude::updateBuffer(ParIterator const & it, UpdateType utype, bool 
const deleted)
 {
        file_exist_ = includedFileExist();
-       Buffer const * const childbuffer = getChildBuffer();
+       Buffer const * const childbuffer = loadIfNeeded();
        if (childbuffer) {
                if (!checkForRecursiveInclude(childbuffer))
                        childbuffer->updateBuffer(Buffer::UpdateChildOnly, 
utype);
diff --git a/src/insets/InsetInclude.h b/src/insets/InsetInclude.h
index 6636583..66487bc 100644
--- a/src/insets/InsetInclude.h
+++ b/src/insets/InsetInclude.h
@@ -48,8 +48,9 @@ public:
 
        ///
        void setChildBuffer(Buffer * buffer);
-       /// \return the child buffer if the file is a LyX doc and could be 
loaded
-       Buffer * getChildBuffer() const;
+
+       /// \return loaded Buffer or zero if the file loading did not proceed.
+       Buffer * loadIfNeeded() const;
 
        /** Update the cache with all bibfiles in use of the child buffer
         *  (including bibfiles of grandchild documents).
@@ -131,8 +132,6 @@ private:
         *  and the preview should be regenerated.
         */
        void fileChanged() const;
-       /// \return loaded Buffer or zero if the file loading did not proceed.
-       Buffer * loadIfNeeded() const;
        /// launch external application
        void editIncluded(std::string const & file);
        ///
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to