summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-01-02 21:33:09 -0500
committerMichael Meeks <michael.meeks@collabora.com>2018-04-16 16:12:40 +0100
commit5a941a5f5c33e559b85203291f9db8fb6fa255be (patch)
treee76a0e58e1ab3939d8d6bcc75e9f71b43530876e
parent8ebfd39798eeae395360434ede530d59a2db9750 (diff)
wsd: properly initialize members
Change-Id: I4cf10b57ab37a88383e9d2cc6408427df9acfb38 Reviewed-on: https://gerrit.libreoffice.org/47363 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--wsd/AdminModel.hpp19
1 files changed, 11 insertions, 8 deletions
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.