mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Replace crlf line endings with lf (#1731)
This commit is contained in:
committed by
Peter Johnson
parent
b6d5d90d9d
commit
f7cfdd7cee
@@ -117,10 +117,10 @@
|
||||
#ifndef LLVM_NODISCARD
|
||||
#if __cplusplus > 201402L && __has_cpp_attribute(nodiscard)
|
||||
#define LLVM_NODISCARD [[nodiscard]]
|
||||
// Detect MSVC directly, since __cplusplus still defaults to old version
|
||||
#elif _MSVC_LANG >= 201703L
|
||||
#define LLVM_NODISCARD [[nodiscard]]
|
||||
#elif _MSC_VER
|
||||
// Detect MSVC directly, since __cplusplus still defaults to old version
|
||||
#elif _MSVC_LANG >= 201703L
|
||||
#define LLVM_NODISCARD [[nodiscard]]
|
||||
#elif _MSC_VER
|
||||
#define LLVM_NODISCARD
|
||||
#elif !__cplusplus
|
||||
// Workaround for llvm.org/PR23435, since clang 3.6 and below emit a spurious
|
||||
@@ -241,10 +241,10 @@
|
||||
#ifndef LLVM_FALLTHROUGH
|
||||
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
|
||||
#define LLVM_FALLTHROUGH [[fallthrough]]
|
||||
// Detect MSVC directly, since __cplusplus still defaults to old version
|
||||
#elif _MSVC_LANG >= 201703L
|
||||
#define LLVM_FALLTHROUGH [[fallthrough]]
|
||||
#elif _MSC_VER
|
||||
// Detect MSVC directly, since __cplusplus still defaults to old version
|
||||
#elif _MSVC_LANG >= 201703L
|
||||
#define LLVM_FALLTHROUGH [[fallthrough]]
|
||||
#elif _MSC_VER
|
||||
#define LLVM_FALLTHROUGH
|
||||
#elif __has_cpp_attribute(gnu::fallthrough)
|
||||
#define LLVM_FALLTHROUGH [[gnu::fallthrough]]
|
||||
|
||||
@@ -2962,13 +2962,13 @@ class json
|
||||
{
|
||||
std::allocator<T> alloc;
|
||||
|
||||
using AllocatorTraits = std::allocator_traits<std::allocator<T>>;
|
||||
|
||||
auto deleter = [&](T * object)
|
||||
{
|
||||
AllocatorTraits::deallocate(alloc, object, 1);
|
||||
};
|
||||
std::unique_ptr<T, decltype(deleter)> object(AllocatorTraits::allocate(alloc, 1), deleter);
|
||||
using AllocatorTraits = std::allocator_traits<std::allocator<T>>;
|
||||
|
||||
auto deleter = [&](T * object)
|
||||
{
|
||||
AllocatorTraits::deallocate(alloc, object, 1);
|
||||
};
|
||||
std::unique_ptr<T, decltype(deleter)> object(AllocatorTraits::allocate(alloc, 1), deleter);
|
||||
AllocatorTraits::construct(alloc, object.get(), std::forward<Args>(args)...);
|
||||
assert(object != nullptr);
|
||||
return object.release();
|
||||
@@ -5320,7 +5320,7 @@ class json
|
||||
if (is_string())
|
||||
{
|
||||
std::allocator<std::string> alloc;
|
||||
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);
|
||||
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);
|
||||
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);
|
||||
m_value.string = nullptr;
|
||||
}
|
||||
@@ -5424,7 +5424,7 @@ class json
|
||||
if (is_string())
|
||||
{
|
||||
std::allocator<std::string> alloc;
|
||||
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);
|
||||
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);
|
||||
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);
|
||||
m_value.string = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user