Small fixes for compat with clang.
This commit is contained in:
parent
44173ffdbc
commit
ce4dd9b096
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cppcoreguidelines-pro-type-member-init,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: none
|
||||
CheckOptions:
|
||||
- key: cert-dcl16-c.NewSuffixes
|
||||
value: 'L;LL;LU;LLU'
|
||||
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
|
||||
value: '1'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||
value: '10'
|
||||
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||
value: '2'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: modernize-loop-convert.MinConfidence
|
||||
value: reasonable
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: CamelCase
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-bool-literals.IgnoreMacros
|
||||
value: '0'
|
||||
- key: modernize-use-default-member-init.IgnoreMacros
|
||||
value: '0'
|
||||
- key: modernize-use-default-member-init.UseAssignment
|
||||
value: '1'
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '0'
|
||||
...
|
||||
|
|
@ -49,21 +49,17 @@ constexpr auto ANSI_Cyan = "\u001b[36m";
|
|||
constexpr auto ANSI_White = "\u001b[37m";
|
||||
constexpr auto ANSI_Reset = "\u001b[0m";
|
||||
|
||||
using std::forward;
|
||||
using std::move;
|
||||
using std::tie;
|
||||
|
||||
template <typename T>
|
||||
using Option = std::optional<T>;
|
||||
|
||||
template <typename type_t, typename from_t>
|
||||
constexpr auto cast(from_t &&_in) {
|
||||
return static_cast<type_t>(forward<from_t>(_in));
|
||||
return static_cast<type_t>(std::forward<from_t>(_in));
|
||||
}
|
||||
|
||||
template <typename type_t, typename from_t>
|
||||
constexpr auto recast(from_t &&_in) {
|
||||
return reinterpret_cast<type_t>(forward<from_t>(_in));
|
||||
return reinterpret_cast<type_t>(std::forward<from_t>(_in));
|
||||
}
|
||||
|
||||
constexpr f32 operator""_deg(long double degrees) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <cstdio>
|
||||
|
||||
#define VMA_IMPLEMENTATION
|
||||
#include <vma/vk_mem_alloc.h>
|
||||
#include <vk_mem_alloc.h>
|
||||
|
||||
// NOTE: Vulkan Dispatch Loader Storage - Should only appear once.
|
||||
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ struct Logger {
|
|||
return "[DEBUG]:";
|
||||
if constexpr (LogLevel == LogType::eVerbose)
|
||||
return "[VERB]: ";
|
||||
return "";
|
||||
}
|
||||
|
||||
template <LogType LogLevel>
|
||||
|
|
@ -52,6 +53,7 @@ struct Logger {
|
|||
return ANSI_White;
|
||||
if constexpr (LogLevel == LogType::eVerbose)
|
||||
return ANSI_Blue;
|
||||
return ANSI_White;
|
||||
}
|
||||
|
||||
template <LogType LogLevel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue