[Libreoffice-commits] online.git: 2 commits - loolwsd/AdminModel.hpp loolwsd/ChildProcessSession.hpp loolwsd/Common.hpp loolwsd/FileServer.hpp loolwsd/LOOLKit.hpp loolwsd/LOOLWSD.cpp loolwsd/Storage.hpp loolwsd/Unit.hpp loolwsd/UnitHTTP.hpp

Tor Lillqvist tml at collabora.com
Fri Apr 8 08:10:38 UTC 2016


 loolwsd/AdminModel.hpp          |    4 ++--
 loolwsd/ChildProcessSession.hpp |    4 ++--
 loolwsd/Common.hpp              |    1 +
 loolwsd/FileServer.hpp          |    4 ++--
 loolwsd/LOOLKit.hpp             |    6 +++---
 loolwsd/LOOLWSD.cpp             |    8 ++++----
 loolwsd/Storage.hpp             |    1 +
 loolwsd/Unit.hpp                |    6 +++---
 loolwsd/UnitHTTP.hpp            |    8 +++++---
 9 files changed, 23 insertions(+), 19 deletions(-)

New commits:
commit f6d9b2c0997523f3d1688ba37524274d7272fd07
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Apr 8 11:08:41 2016 +0300

    Consistency is a virtue
    
    (But sure, tons of much more annoying inconsistencies in style
    remain.)

diff --git a/loolwsd/AdminModel.hpp b/loolwsd/AdminModel.hpp
index 7f7bf76..04d65a6 100644
--- a/loolwsd/AdminModel.hpp
+++ b/loolwsd/AdminModel.hpp
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_ADMIN_MODEL_HPP
-#define INCLUDED_ADMIN_MODEL_HPP
+#ifndef INCLUDED_ADMINMODEL_HPP
+#define INCLUDED_ADMINMODEL_HPP
 
 #include <memory>
 #include <set>
diff --git a/loolwsd/ChildProcessSession.hpp b/loolwsd/ChildProcessSession.hpp
index b3d2a82..ab3347c 100644
--- a/loolwsd/ChildProcessSession.hpp
+++ b/loolwsd/ChildProcessSession.hpp
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_LOOLCHILDPROCESSSESSION_HPP
-#define INCLUDED_LOOLCHILDPROCESSSESSION_HPP
+#ifndef INCLUDED_CHILDPROCESSSESSION_HPP
+#define INCLUDED_CHILDPROCESSSESSION_HPP
 
 #include <mutex>
 
diff --git a/loolwsd/Common.hpp b/loolwsd/Common.hpp
index 1423251..d09c08b 100644
--- a/loolwsd/Common.hpp
+++ b/loolwsd/Common.hpp
@@ -41,4 +41,5 @@ constexpr auto NEW_CHILD_URI = "/loolws/newchild?";
 constexpr auto SSL_KEY_FILE = "key.pem";
 
 #endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/FileServer.hpp b/loolwsd/FileServer.hpp
index 0511431..721768d 100644
--- a/loolwsd/FileServer.hpp
+++ b/loolwsd/FileServer.hpp
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_FILE_SERVER_HPP
-#define INCLUDED_FILE_SERVER_HPP
+#ifndef INCLUDED_FILESERVER_HPP
+#define INCLUDED_FILESERVER_HPP
 
 #include <string>
 #include <vector>
diff --git a/loolwsd/LOOLKit.hpp b/loolwsd/LOOLKit.hpp
index 4f1bcc3..a898166 100644
--- a/loolwsd/LOOLKit.hpp
+++ b/loolwsd/LOOLKit.hpp
@@ -6,8 +6,8 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
-#ifndef LOOL_KIT_HPP
-#define LOOL_KIT_HPP
+#ifndef INCLUDED_LOOLKIT_HPP
+#define INCLUDED_LOOLKIT_HPP
 
 void lokit_main(const std::string& childRoot,
                 const std::string& sysTemplate,
@@ -16,6 +16,6 @@ void lokit_main(const std::string& childRoot,
 
 bool globalPreinit(const std::string &loTemplate);
 
-#endif // LOOL_KIT_HPP
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/Storage.hpp b/loolwsd/Storage.hpp
index 5a34d29..422fe2f 100644
--- a/loolwsd/Storage.hpp
+++ b/loolwsd/Storage.hpp
@@ -144,4 +144,5 @@ private:
 };
 
 #endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/Unit.hpp b/loolwsd/Unit.hpp
index 75b2b0f..a2d4f0d 100644
--- a/loolwsd/Unit.hpp
+++ b/loolwsd/Unit.hpp
@@ -6,8 +6,8 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
-#ifndef LOOL_UNIT_HPP
-#define LOOL_UNIT_HPP
+#ifndef INCLUDED_UNIT_HPP
+#define INCLUDED_UNIT_HPP
 
 #include <string>
 #include <memory>
@@ -72,6 +72,6 @@ public:
                                std::unique_ptr<StorageBase> & /*rStorage */) { return false; }
 };
 
-#endif // LOOL_UNIT_HPP
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/UnitHTTP.hpp b/loolwsd/UnitHTTP.hpp
index 0f4c992..4585caf 100644
--- a/loolwsd/UnitHTTP.hpp
+++ b/loolwsd/UnitHTTP.hpp
@@ -6,8 +6,8 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
-#ifndef LOOL_UNIT_HTTP_HPP
-#define LOOL_UNIT_HTTP_HPP
+#ifndef INCLUDED_UNITHTTP_HPP
+#define INCLUDED_UNITHTTP_HPP
 
 #include <Poco/Net/HTTPRequest.h>
 #include <Poco/Net/HTTPServerParams.h>
@@ -70,4 +70,6 @@ public:
         { return _response; }
 };
 
-#endif // LOOL_UNIT_HTTP_HPP
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit ecff38df83fb09755734376b2ff62bc29b4ffc2f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Apr 8 11:00:58 2016 +0300

    These can be static

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 08076c2..f7798f4 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -152,7 +152,7 @@ static std::condition_variable newChildrenCV;
 static std::map<std::string, std::shared_ptr<DocumentBroker>> docBrokers;
 static std::mutex docBrokersMutex;
 
-void forkChildren(int number)
+static void forkChildren(int number)
 {
     assert(!newChildrenMutex.try_lock()); // check it is held.
 
@@ -161,7 +161,7 @@ void forkChildren(int number)
     IoUtil::writeFIFO(LOOLWSD::ForKitWritePipe, aMessage);
 }
 
-void preForkChildren()
+static void preForkChildren()
 {
     std::unique_lock<std::mutex> lock(newChildrenMutex);
     int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
@@ -169,7 +169,7 @@ void preForkChildren()
     forkChildren(numPreSpawn);
 }
 
-std::shared_ptr<ChildProcess> getNewChild()
+static std::shared_ptr<ChildProcess> getNewChild()
 {
     std::unique_lock<std::mutex> lock(newChildrenMutex);
 
@@ -968,7 +968,7 @@ std::string LOOLWSD::LoSubPath = "lo";
 std::string LOOLWSD::FileServerRoot;
 std::string LOOLWSD::AdminCreds;
 bool LOOLWSD::AllowLocalStorage = false;
-std::string UnitTestLibrary;
+static std::string UnitTestLibrary;
 
 unsigned int LOOLWSD::NumPreSpawnedChildren = 0;
 bool LOOLWSD::DoTest = false;


More information about the Libreoffice-commits mailing list