[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/AdminModel.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Apr 16 15:13:46 UTC 2018
wsd/AdminModel.hpp | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 5a941a5f5c33e559b85203291f9db8fb6fa255be
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Tue Jan 2 21:33:09 2018 -0500
wsd: properly initialize members
Change-Id: I4cf10b57ab37a88383e9d2cc6408427df9acfb38
Reviewed-on: https://gerrit.libreoffice.org/47363
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
Signed-off-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp
index 2bba6ab62..adad7f564 100644
--- a/wsd/AdminModel.hpp
+++ b/wsd/AdminModel.hpp
@@ -58,10 +58,10 @@ struct DocProcSettings
/// Containing basic information about document
struct DocBasicInfo
{
- std::string _docKey;
- std::time_t _idleTime;
- bool _saved;
- int _mem;
+ const std::string _docKey;
+ const std::time_t _idleTime;
+ const bool _saved;
+ const int _mem;
DocBasicInfo(const std::string& docKey, std::time_t idleTime, bool saved, int mem)
: _docKey(docKey),
@@ -80,13 +80,16 @@ public:
const std::string& filename)
: _docKey(docKey),
_pid(pid),
+ _activeViews(0),
_filename(filename),
_memoryDirty(0),
_lastJiffy(0),
_start(std::time(nullptr)),
_lastActivity(_start),
+ _end(0),
_sentBytes(0),
- _recvBytes(0)
+ _recvBytes(0),
+ _isModified(false)
{
}
@@ -136,13 +139,12 @@ public:
std::string to_string() const;
private:
- bool _isModified;
const std::string _docKey;
const Poco::Process::PID _pid;
/// SessionId mapping to View object
std::map<std::string, View> _views;
/// Total number of active views
- unsigned _activeViews = 0;
+ unsigned _activeViews;
/// Hosted filename
std::string _filename;
/// The dirty (ie. un-shared) memory of the document's Kit process.
@@ -152,7 +154,7 @@ private:
std::time_t _start;
std::time_t _lastActivity;
- std::time_t _end = 0;
+ std::time_t _end;
std::map<std::time_t,std::string> _snapshots;
/// Total bytes sent and recv'd by this document.
@@ -160,6 +162,7 @@ private:
/// Per-doc kit process settings.
DocProcSettings _docProcSettings;
+ bool _isModified;
};
/// An Admin session subscriber.
More information about the Libreoffice-commits
mailing list