summaryrefslogtreecommitdiffstats
path: root/wsd
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-04-18 11:39:50 +0300
committerTor Lillqvist <tml@collabora.com>2020-04-18 15:00:18 +0200
commit4eb598711cd6162452a28285abbd65c6397f58bf (patch)
tree3f4d0f5562b715e7d940f5fda144cc5ed88532de /wsd
parentClarify what a DocumentBroker is and in which process they exist (diff)
downloadonline-4eb598711cd6162452a28285abbd65c6397f58bf.tar.gz
online-4eb598711cd6162452a28285abbd65c6397f58bf.zip
Use #pragma once
LibreOffice core uses that, too, and we support an even more restricted set of compilers. Change-Id: I0d0e2c8608e323eb5ef0f35ee8c46d02ab49a745 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92467 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'wsd')
-rw-r--r--wsd/Admin.hpp5
-rw-r--r--wsd/AdminModel.hpp5
-rw-r--r--wsd/Auth.hpp6
-rw-r--r--wsd/ClientSession.hpp6
-rw-r--r--wsd/DocumentBroker.hpp5
-rw-r--r--wsd/Exceptions.hpp6
-rw-r--r--wsd/FileServer.hpp5
-rw-r--r--wsd/LOOLWSD.hpp5
-rw-r--r--wsd/ProofKey.hpp6
-rw-r--r--wsd/QueueHandler.hpp2
-rw-r--r--wsd/SenderQueue.hpp5
-rw-r--r--wsd/Storage.hpp6
-rw-r--r--wsd/TileCache.hpp5
-rw-r--r--wsd/TileDesc.hpp5
-rw-r--r--wsd/TraceFile.hpp5
-rw-r--r--wsd/UserMessages.hpp6
16 files changed, 22 insertions, 61 deletions
diff --git a/wsd/Admin.hpp b/wsd/Admin.hpp
index 6287d38bc4..701cf2e9db 100644
--- a/wsd/Admin.hpp
+++ b/wsd/Admin.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_ADMIN_HPP
-#define INCLUDED_ADMIN_HPP
+#pragma once
#include <mutex>
@@ -188,6 +187,4 @@ private:
static const int DefStatsIntervalMs;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp
index b097289ef9..f5420747d1 100644
--- a/wsd/AdminModel.hpp
+++ b/wsd/AdminModel.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_ADMINMODEL_HPP
-#define INCLUDED_ADMINMODEL_HPP
+#pragma once
#include <memory>
#include <set>
@@ -370,6 +369,4 @@ private:
std::thread::id _owner;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/Auth.hpp b/wsd/Auth.hpp
index 00256fb1f5..30f26ff0ce 100644
--- a/wsd/Auth.hpp
+++ b/wsd/Auth.hpp
@@ -8,8 +8,8 @@
*/
// Authentication and Authorization support.
-#ifndef INCLUDED_AUTH_HPP
-#define INCLUDED_AUTH_HPP
+
+#pragma once
#include <cassert>
#include <string>
@@ -103,6 +103,4 @@ private:
#endif
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index e11ac721cc..0f425b1171 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_CLIENTSSESSION_HPP
-#define INCLUDED_CLIENTSSESSION_HPP
+#pragma once
#include "Session.hpp"
#include "Storage.hpp"
@@ -289,7 +288,4 @@ private:
std::chrono::steady_clock::time_point _viewLoadStart;
};
-
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 6f37607f78..d161be4aae 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_DOCUMENTBROKER_HPP
-#define INCLUDED_DOCUMENTBROKER_HPP
+#pragma once
#include <csignal>
@@ -448,6 +447,4 @@ public:
static void removeFile(const std::string &uri);
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/Exceptions.hpp b/wsd/Exceptions.hpp
index 911dd40238..007cc7359c 100644
--- a/wsd/Exceptions.hpp
+++ b/wsd/Exceptions.hpp
@@ -9,8 +9,8 @@
// Exception classes to differentiate between the
// different error situations and handling.
-#ifndef INCLUDED_EXCEPTIONS_HPP
-#define INCLUDED_EXCEPTIONS_HPP
+
+#pragma once
#include <exception>
#include <stdexcept>
@@ -81,6 +81,4 @@ public:
using LoolException::LoolException;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/FileServer.hpp b/wsd/FileServer.hpp
index 365da309ce..47ab86d3c6 100644
--- a/wsd/FileServer.hpp
+++ b/wsd/FileServer.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_FILESERVER_HPP
-#define INCLUDED_FILESERVER_HPP
+#pragma once
#include <string>
#include "Socket.hpp"
@@ -48,6 +47,4 @@ private:
const std::string& longMessage, const std::string& extraHeader = "");
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 821a7e5e40..368b58076c 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_LOOLWSD_HPP
-#define INCLUDED_LOOLWSD_HPP
+#pragma once
#include <algorithm>
#include <atomic>
@@ -496,6 +495,4 @@ public:
#endif
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/ProofKey.hpp b/wsd/ProofKey.hpp
index 9ac3c7b1cf..34dd98e125 100644
--- a/wsd/ProofKey.hpp
+++ b/wsd/ProofKey.hpp
@@ -8,8 +8,8 @@
*/
// WOPI proof management
-#ifndef INCLUDED_PROOFKEY_HPP
-#define INCLUDED_PROOFKEY_HPP
+
+#pragma once
#include <string>
#include <utility>
@@ -72,6 +72,4 @@ VecOfStringPairs GetProofHeaders(const std::string& access_token, const std::str
// If no proof key, returns empty vector
const VecOfStringPairs& GetProofKeyAttributes();
-#endif // INCLUDED_PROOFKEY_HPP
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/QueueHandler.hpp b/wsd/QueueHandler.hpp
index 54aea6ad7c..434742ea8c 100644
--- a/wsd/QueueHandler.hpp
+++ b/wsd/QueueHandler.hpp
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#pragma once
+
#include <Poco/Runnable.h>
#include "Protocol.hpp"
diff --git a/wsd/SenderQueue.hpp b/wsd/SenderQueue.hpp
index 3f08c6286c..e880e5c233 100644
--- a/wsd/SenderQueue.hpp
+++ b/wsd/SenderQueue.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_SENDERQUEUE_HPP
-#define INCLUDED_SENDERQUEUE_HPP
+#pragma once
#include <condition_variable>
#include <deque>
@@ -156,6 +155,4 @@ private:
typedef typename std::deque<Item>::value_type queue_item_t;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index bb678ac8aa..78eab64348 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -8,8 +8,8 @@
*/
// Storage abstraction.
-#ifndef INCLUDED_STORAGE_HPP
-#define INCLUDED_STORAGE_HPP
+
+#pragma once
#include <set>
#include <string>
@@ -626,6 +626,4 @@ private:
std::unique_ptr<AuthBase> _authAgent;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/TileCache.hpp b/wsd/TileCache.hpp
index 50303c8950..38b2118a0c 100644
--- a/wsd/TileCache.hpp
+++ b/wsd/TileCache.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_TILECACHE_HPP
-#define INCLUDED_TILECACHE_HPP
+#pragma once
#include <iosfwd>
#include <memory>
@@ -205,6 +204,4 @@ private:
std::map<std::string, Tile> _streamCache[(int)StreamType::Last];
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/TileDesc.hpp b/wsd/TileDesc.hpp
index e8eebdcf20..490a8e2c13 100644
--- a/wsd/TileDesc.hpp
+++ b/wsd/TileDesc.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_TILEDESC_HPP
-#define INCLUDED_TILEDESC_HPP
+#pragma once
#include <cassert>
#include <map>
@@ -568,6 +567,4 @@ private:
int _tileHeight;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/TraceFile.hpp b/wsd/TraceFile.hpp
index 8ef7eb201d..38e43e8390 100644
--- a/wsd/TraceFile.hpp
+++ b/wsd/TraceFile.hpp
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_TRACEFILE_HPP
-#define INCLUDED_TRACEFILE_HPP
+#pragma once
#include <fstream>
#include <mutex>
@@ -512,6 +511,4 @@ private:
unsigned _indexOut;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/UserMessages.hpp b/wsd/UserMessages.hpp
index 00ad7875b0..5437f85095 100644
--- a/wsd/UserMessages.hpp
+++ b/wsd/UserMessages.hpp
@@ -9,13 +9,11 @@
// A list of user-visible messages.
// This list is intended to be centralized for review and i18n support.
-#ifndef INCLUDED_USERMESSAGES_HPP
-#define INCLUDED_USERMESSAGES_HPP
+
+#pragma once
constexpr const char* SERVICE_UNAVAILABLE_INTERNAL_ERROR = "error: cmd=socket kind=serviceunavailable";
constexpr const char* PAYLOAD_UNAVAILABLE_LIMIT_REACHED = "error: cmd=socket kind=hardlimitreached params=%u,%u";
constexpr const char* PAYLOAD_INFO_LIMIT_REACHED = "info: cmd=socket kind=limitreached params=%u,%u";
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */