Skip to content

Commit

Permalink
Privatize KitQueue member of Document.
Browse files Browse the repository at this point in the history
It is no longer used externally.

Signed-off-by: Michael Meeks <[email protected]>
Change-Id: I69ca1d6b01a4ca97b6d4815c21c76c5ce8c939e6
  • Loading branch information
mmeeks committed Dec 7, 2024
1 parent 6c12477 commit bf9c16b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions kit/Kit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ Document::Document(const std::shared_ptr<lok::Office>& loKit, const std::string&
, _docId(docId)
, _url(url)
, _obfuscatedFileId(Uri::getFilenameFromURL(docKey))
, _queue(std::make_shared<KitQueue>())
, _queue(new KitQueue())
, _websocketHandler(websocketHandler)
, _modified(ModifiedState::UnModified)
, _isBgSaveProcess(false)
Expand Down Expand Up @@ -1145,7 +1145,7 @@ void Document::trimAfterInactivity()
assert(descriptor && "Null callback data.");
assert(descriptor->getDoc() && "Null Document instance.");

std::shared_ptr<KitQueue> queue = descriptor->getDoc()->_queue;
std::unique_ptr<KitQueue> &queue = descriptor->getDoc()->_queue;
assert(queue && "Null KitQueue.");

const std::string payload = p ? p : "(nil)";
Expand Down
4 changes: 1 addition & 3 deletions kit/Kit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ class Document final : public std::enable_shared_from_this<Document>
/// Are we currently performing a load ?
bool isLoadOngoing() const { return _duringLoad > 0; }

std::shared_ptr<KitQueue> getQueue() const { return _queue; }

LogUiCmd& getLogUiCmd() { return logUiCmd; }

private:
Expand All @@ -419,7 +417,7 @@ class Document final : public std::enable_shared_from_this<Document>
#ifdef __ANDROID__
static std::shared_ptr<lok::Document> _loKitDocumentForAndroidOnly;
#endif
std::shared_ptr<KitQueue> _queue;
std::unique_ptr<KitQueue> _queue;

// Connection to the coolwsd process
std::shared_ptr<WebSocketHandler> _websocketHandler;
Expand Down

0 comments on commit bf9c16b

Please sign in to comment.