util, io, net, ...: use "#pragma once"
This commit is contained in:
committed by
Max Kellermann
parent
313f2a1894
commit
be84b189dc
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef ALLOCATED_STRING_HXX
|
||||
#define ALLOCATED_STRING_HXX
|
||||
#pragma once
|
||||
|
||||
#include "StringPointer.hxx"
|
||||
|
||||
@@ -164,5 +163,3 @@ public:
|
||||
|
||||
using BasicAllocatedString::operator=;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef CAST_HXX
|
||||
#define CAST_HXX
|
||||
#pragma once
|
||||
|
||||
#include "OffsetPointer.hxx"
|
||||
|
||||
@@ -55,5 +54,3 @@ ContainerCast(const A &a, const A C::*member)
|
||||
{
|
||||
return *OffsetCast<const C, const A>(&a, -ContainerAttributeOffset<C, A>(member));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef CHAR_UTIL_HXX
|
||||
#define CHAR_UTIL_HXX
|
||||
#pragma once
|
||||
|
||||
#ifdef _UNICODE
|
||||
#include "WCharUtil.hxx"
|
||||
@@ -140,5 +139,3 @@ IsHexDigit(char ch) noexcept
|
||||
(ch >= 'a' && ch <= 'f') ||
|
||||
(ch >= 'A' && ch <= 'F');
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef DELETE_DISPOSER_HXX
|
||||
#define DELETE_DISPOSER_HXX
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* A disposer for boost::intrusive that invokes the "delete" operator
|
||||
@@ -15,5 +14,3 @@ public:
|
||||
delete t;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef DYNAMIC_FIFO_BUFFER_HXX
|
||||
#define DYNAMIC_FIFO_BUFFER_HXX
|
||||
#pragma once
|
||||
|
||||
#include "ForeignFifoBuffer.hxx"
|
||||
|
||||
@@ -91,5 +90,3 @@ public:
|
||||
protected:
|
||||
using ForeignFifoBuffer<T>::GetBuffer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef EXCEPTION_HXX
|
||||
#define EXCEPTION_HXX
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
@@ -113,5 +112,3 @@ std::string
|
||||
GetFullMessage(std::exception_ptr ep,
|
||||
const char *fallback="Unknown exception",
|
||||
const char *separator="; ") noexcept;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
// Copyright CM4all GmbH
|
||||
// author: Max Kellermann <mk@cm4all.com>
|
||||
|
||||
#ifndef PRINT_EXCEPTION_HXX
|
||||
#define PRINT_EXCEPTION_HXX
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
|
||||
@@ -15,5 +14,3 @@ PrintException(const std::exception &e) noexcept;
|
||||
|
||||
void
|
||||
PrintException(const std::exception_ptr &ep) noexcept;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef SCOPE_EXIT_HXX
|
||||
#define SCOPE_EXIT_HXX
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
@@ -64,5 +63,3 @@ struct ScopeExitTag {
|
||||
* Boost's compile-time and runtime bloat.
|
||||
*/
|
||||
#define AtScopeExit(...) auto ScopeExitName(__LINE__) = ScopeExitTag() + [__VA_ARGS__]()
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
// Copyright CM4all GmbH
|
||||
// author: Max Kellermann <mk@cm4all.com>
|
||||
|
||||
#ifndef SHALLOW_COPY_HXX
|
||||
#define SHALLOW_COPY_HXX
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* A tag for overloading copying constructors, telling them to make
|
||||
@@ -11,5 +10,3 @@
|
||||
* duplicating the referenced objects).
|
||||
*/
|
||||
struct ShallowCopy {};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef STRING_API_HXX
|
||||
#define STRING_API_HXX
|
||||
#pragma once
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -193,5 +192,3 @@ DuplicateString(const char *p) noexcept
|
||||
{
|
||||
return strdup(p);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef STRING_BUFFER_HXX
|
||||
#define STRING_BUFFER_HXX
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
@@ -89,5 +88,3 @@ public:
|
||||
|
||||
template<std::size_t CAPACITY>
|
||||
class StringBuffer : public BasicStringBuffer<char, CAPACITY> {};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#ifndef STRING_POINTER_HXX
|
||||
#define STRING_POINTER_HXX
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -52,5 +51,3 @@ public:
|
||||
return *value == SENTINEL;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user