wsd: remove single-use member

And a couple of const cases.
The removed const is to allow move on return.

Change-Id: I7a81b531e75c39379871f5ffeb82d49ba1110ab1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2021-02-07 21:53:39 -05:00 committed by Ashod Nakashian
parent 6dcefc4f14
commit f7d61ae0d3
4 changed files with 5 additions and 6 deletions

View file

@ -771,7 +771,7 @@ namespace Util
// Prepend with count to make it unique within a single process instance,
// in case we get collisions (which we will, eventually). N.B.: Identical
// strings likely to have different prefixes when logged in WSD process vs. Kit.
const std::string res
std::string res
= '#' + Util::encodeId(AnonymizationCounter++, 0) + '#' + Util::encodeId(hash, 0) + '#';
mapAnonymized(text, res);
return res;

View file

@ -914,7 +914,8 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
dontUseCache = true;
#endif
_tileCache = Util::make_unique<TileCache>(_storage->getUriString(), _lastFileModifiedTime, dontUseCache);
_tileCache = Util::make_unique<TileCache>(_storage->getUri().toString(),
_lastFileModifiedTime, dontUseCache);
_tileCache->setThreadOwner(std::this_thread::get_id());
}

View file

@ -1029,8 +1029,8 @@ void LOOLWSD::initialize(Application& self)
setenv("LOOL_LOGLEVEL", LogLevel.c_str(), true);
#if !ENABLE_DEBUG
std::string SalLog = getConfigValue<std::string>(conf, "logging.lokit_sal_log", "-INFO-WARN");
setenv("SAL_LOG", SalLog.c_str(), 0);
const std::string salLog = getConfigValue<std::string>(conf, "logging.lokit_sal_log", "-INFO-WARN");
setenv("SAL_LOG", salLog.c_str(), 0);
#endif
const bool withColor = getConfigValue<bool>(conf, "logging.color", true) && isatty(fileno(stderr));

View file

@ -176,8 +176,6 @@ public:
const Poco::URI& getUri() const { return _uri; }
const std::string getUriString() const { return _uri.toString(); }
const std::string& getJailPath() const { return _jailPath; };
/// Returns the root path to the jailed file.