diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Authorization.hpp | 5 | ||||
-rw-r--r-- | common/Clipboard.hpp | 6 | ||||
-rw-r--r-- | common/Common.hpp | 6 | ||||
-rw-r--r-- | common/Crypto.hpp | 5 | ||||
-rw-r--r-- | common/FileUtil.hpp | 5 | ||||
-rw-r--r-- | common/JsonUtil.hpp | 5 | ||||
-rw-r--r-- | common/LOOLWebSocket.hpp | 5 | ||||
-rw-r--r-- | common/Log.hpp | 5 | ||||
-rw-r--r-- | common/Message.hpp | 5 | ||||
-rw-r--r-- | common/MessageQueue.hpp | 5 | ||||
-rw-r--r-- | common/Png.hpp | 2 | ||||
-rw-r--r-- | common/Protocol.hpp | 5 | ||||
-rw-r--r-- | common/Rectangle.hpp | 5 | ||||
-rw-r--r-- | common/Seccomp.hpp | 6 | ||||
-rw-r--r-- | common/Session.hpp | 5 | ||||
-rw-r--r-- | common/SigUtil.cpp | 2 | ||||
-rw-r--r-- | common/SigUtil.hpp | 5 | ||||
-rw-r--r-- | common/SpookyV2.h | 2 | ||||
-rw-r--r-- | common/StringVector.hpp | 5 | ||||
-rw-r--r-- | common/Unit.hpp | 6 | ||||
-rw-r--r-- | common/UnitHTTP.hpp | 6 | ||||
-rw-r--r-- | common/Util.hpp | 5 | ||||
-rw-r--r-- | common/security.h | 2 |
23 files changed, 32 insertions, 76 deletions
diff --git a/common/Authorization.hpp b/common/Authorization.hpp index c8c594988..4fd2f3671 100644 --- a/common/Authorization.hpp +++ b/common/Authorization.hpp @@ -9,8 +9,7 @@ // WOPI Authorization -#ifndef INCLUDED_AUTHORIZATION_HPP -#define INCLUDED_AUTHORIZATION_HPP +#pragma once #include <string> @@ -51,6 +50,4 @@ public: void authorizeRequest(Poco::Net::HTTPRequest& request) const; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Clipboard.hpp b/common/Clipboard.hpp index 0b4bee438..15e5e58e2 100644 --- a/common/Clipboard.hpp +++ b/common/Clipboard.hpp @@ -8,8 +8,8 @@ */ // Clipboard abstraction. -#ifndef INCLUDED_CLIPBOARD_HPP -#define INCLUDED_CLIPBOARD_HPP + +#pragma once #include <string> #include <vector> @@ -142,6 +142,4 @@ public: } }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Common.hpp b/common/Common.hpp index ab9989e73..b12cc67b5 100644 --- a/common/Common.hpp +++ b/common/Common.hpp @@ -7,11 +7,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#pragma once + #include <string> // Default values and other shared data between processes. -#ifndef INCLUDED_COMMON_HPP -#define INCLUDED_COMMON_HPP constexpr int DEFAULT_CLIENT_PORT_NUMBER = 9980; @@ -50,6 +50,4 @@ constexpr const char CAPABILITIES_END_POINT[] = "/hosting/capabilities"; extern int ClientPortNumber; extern std::string MasterLocation; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Crypto.hpp b/common/Crypto.hpp index 079a4f742..270e74e0e 100644 --- a/common/Crypto.hpp +++ b/common/Crypto.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_CRYPTO_HPP -#define INCLUDED_CRYPTO_HPP +#pragma once #if ENABLE_SUPPORT_KEY @@ -39,6 +38,4 @@ public: #endif -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/FileUtil.hpp b/common/FileUtil.hpp index 864188308..29426e16c 100644 --- a/common/FileUtil.hpp +++ b/common/FileUtil.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_FILEUTIL_HPP -#define INCLUDED_FILEUTIL_HPP +#pragma once #include <string> @@ -98,6 +97,4 @@ namespace FileUtil } // end namespace FileUtil -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/JsonUtil.hpp b/common/JsonUtil.hpp index c7fa20ac2..42cd4e915 100644 --- a/common/JsonUtil.hpp +++ b/common/JsonUtil.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_JSONUTIL_HPP -#define INCLUDED_JSONUTIL_HPP +#pragma once #include <cstddef> #include <set> @@ -140,7 +139,5 @@ bool findJSONValue(Poco::JSON::Object::Ptr &object, const std::string& key, T& v } // end namespace JsonUtil -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/LOOLWebSocket.hpp b/common/LOOLWebSocket.hpp index 2c0559593..a99c3afb0 100644 --- a/common/LOOLWebSocket.hpp +++ b/common/LOOLWebSocket.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_LOOLWEBSOCKET_HPP -#define INCLUDED_LOOLWEBSOCKET_HPP +#pragma once #include <cstdlib> #include <mutex> @@ -157,6 +156,4 @@ public: } }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Log.hpp b/common/Log.hpp index aa83bc171..bc96035e9 100644 --- a/common/Log.hpp +++ b/common/Log.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_LOG_HPP -#define INCLUDED_LOG_HPP +#pragma once #include <sys/syscall.h> #include <unistd.h> @@ -409,6 +408,4 @@ namespace Log } \ } while (false) -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Message.hpp b/common/Message.hpp index 9320037c7..8fc894b96 100644 --- a/common/Message.hpp +++ b/common/Message.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_MESSAGE_HPP -#define INCLUDED_MESSAGE_HPP +#pragma once #include <atomic> #include <string> @@ -184,6 +183,4 @@ private: const Type _type; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/MessageQueue.hpp b/common/MessageQueue.hpp index bf5f6c950..f315de558 100644 --- a/common/MessageQueue.hpp +++ b/common/MessageQueue.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_MESSAGEQUEUE_HPP -#define INCLUDED_MESSAGEQUEUE_HPP +#pragma once #include <algorithm> #include <condition_variable> @@ -253,6 +252,4 @@ private: std::vector<int> _viewOrder; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Png.hpp b/common/Png.hpp index c0a99c74e..496d293df 100644 --- a/common/Png.hpp +++ b/common/Png.hpp @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#pragma once + /* cairo - a vector graphics library with display and print output * * Copyright © 2003 University of Southern California diff --git a/common/Protocol.hpp b/common/Protocol.hpp index 3574d2027..c10e9ae52 100644 --- a/common/Protocol.hpp +++ b/common/Protocol.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_LOOLPROTOCOL_HPP -#define INCLUDED_LOOLPROTOCOL_HPP +#pragma once #include <cstdint> #include <cstdlib> @@ -346,6 +345,4 @@ namespace LOOLProtocol } }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Rectangle.hpp b/common/Rectangle.hpp index 8ed2f3626..3e73bc251 100644 --- a/common/Rectangle.hpp +++ b/common/Rectangle.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_RECTANGLE_HPP -#define INCLUDED_RECTANGLE_HPP +#pragma once #include <limits> @@ -124,6 +123,4 @@ public: } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Seccomp.hpp b/common/Seccomp.hpp index 400745bfa..e18065d0f 100644 --- a/common/Seccomp.hpp +++ b/common/Seccomp.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 INCLUDED_SECCOMP_HPP -#define INCLUDED_SECCOMP_HPP + +#pragma once #include <Protocol.hpp> @@ -24,6 +24,4 @@ namespace Rlimit { bool handleSetrlimitCommand(const StringVector& tokens); }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Session.hpp b/common/Session.hpp index ec99f5e29..3e5f4c89b 100644 --- a/common/Session.hpp +++ b/common/Session.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_SESSION_HPP -#define INCLUDED_SESSION_HPP +#pragma once #include <atomic> #include <cassert> @@ -291,6 +290,4 @@ private: int _canonicalViewId; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp index cd4c779dc..dcca2d295 100644 --- a/common/SigUtil.cpp +++ b/common/SigUtil.cpp @@ -56,11 +56,13 @@ namespace SigUtil bool getTerminationFlag() { + LOG_TRC("getTerminationFlag: " << (TerminationFlag ? "YES" : "NO")); return TerminationFlag; } void setTerminationFlag() { + LOG_TRC("setTerminationFlag"); TerminationFlag = true; } diff --git a/common/SigUtil.hpp b/common/SigUtil.hpp index a0da03142..9bccf0256 100644 --- a/common/SigUtil.hpp +++ b/common/SigUtil.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_SIGNALUTIL_HPP -#define INCLUDED_SIGNALUTIL_HPP +#pragma once #include <atomic> #include <mutex> @@ -83,6 +82,4 @@ namespace SigUtil } // end namespace SigUtil -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/SpookyV2.h b/common/SpookyV2.h index bfda65f93..52b1838e8 100644 --- a/common/SpookyV2.h +++ b/common/SpookyV2.h @@ -26,6 +26,8 @@ // slower than MD5. // +#pragma once + #include <stddef.h> #ifdef _MSC_VER diff --git a/common/StringVector.hpp b/common/StringVector.hpp index 5008277fd..154060bf1 100644 --- a/common/StringVector.hpp +++ b/common/StringVector.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_STRINGVECTOR_HPP -#define INCLUDED_STRINGVECTOR_HPP +#pragma once #include <string> #include <vector> @@ -77,6 +76,4 @@ public: bool equals(size_t index, const StringVector& other, size_t otherIndex); }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Unit.hpp b/common/Unit.hpp index 25e903a3b..9b6a88ece 100644 --- a/common/Unit.hpp +++ b/common/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 INCLUDED_UNIT_HPP -#define INCLUDED_UNIT_HPP + +#pragma once #include <atomic> #include <cassert> @@ -300,6 +300,4 @@ public: } }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/UnitHTTP.hpp b/common/UnitHTTP.hpp index 2eb1c629f..34b225e24 100644 --- a/common/UnitHTTP.hpp +++ b/common/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 INCLUDED_UNITHTTP_HPP -#define INCLUDED_UNITHTTP_HPP + +#pragma once #include <memory> #include <sstream> @@ -157,6 +157,4 @@ public: } }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/Util.hpp b/common/Util.hpp index b4a6c8d7d..820f4e6ce 100644 --- a/common/Util.hpp +++ b/common/Util.hpp @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_UTIL_HPP -#define INCLUDED_UTIL_HPP +#pragma once #include <cassert> #include <cerrno> @@ -1005,6 +1004,4 @@ int main(int argc, char**argv) } // end namespace Util -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/common/security.h b/common/security.h index eb79f465c..f6c0bf258 100644 --- a/common/security.h +++ b/common/security.h @@ -10,6 +10,8 @@ * Place for simple security-related code. */ +#pragma once + #include <sys/mount.h> #include <sys/types.h> |