[Libreoffice-commits] online.git: wsd/AdminModel.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jun 26 03:20:00 UTC 2017


 wsd/AdminModel.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6591f219ed174a005000353aa1547d085258025a
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Jun 25 21:37:57 2017 -0400

    wsd: use logging macros and const ref where possible
    
    Change-Id: I2f56e1887ea9193083043763d7c876bfb785a7f8
    Reviewed-on: https://gerrit.libreoffice.org/39249
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp
index 073d886c..26097fd0 100644
--- a/wsd/AdminModel.cpp
+++ b/wsd/AdminModel.cpp
@@ -178,8 +178,8 @@ void AdminModel::assertCorrectThread() const
 
 AdminModel::~AdminModel()
 {
-    Log::debug("History:\n\n" + getAllHistory() + "\n");
-    Log::info("AdminModel dtor.");
+    LOG_DBG("History:\n\n" << getAllHistory() << '\n');
+    LOG_INF("AdminModel dtor.");
 }
 
 std::string AdminModel::getAllHistory() const
@@ -187,7 +187,7 @@ std::string AdminModel::getAllHistory() const
     std::ostringstream oss;
     oss << "{ \"documents\" : [";
     std::string separator1;
-    for (auto d : _documents)
+    for (const auto& d : _documents)
     {
         oss << separator1;
         oss << d.second.getHistory();
@@ -195,7 +195,7 @@ std::string AdminModel::getAllHistory() const
     }
     oss << "], \"expiredDocuments\" : [";
     separator1 = "";
-    for (auto ed : _expiredDocuments)
+    for (const auto& ed : _expiredDocuments)
     {
         oss << separator1;
         oss << ed.second.getHistory();


More information about the Libreoffice-commits mailing list