mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-29 22:11:31 +00:00
Merge branch 'clang19' into 'master'
Clang 19 build fix (!4549 without sol update) See merge request OpenMW/openmw!4585
This commit is contained in:
commit
2ca1850ea9
4 changed files with 7 additions and 3 deletions
|
@ -52,7 +52,7 @@ namespace
|
|||
return std::find_if(input.begin(), input.end(), [](unsigned char v) { return v == 0 || v >= 128; });
|
||||
}
|
||||
|
||||
std::basic_string_view<signed char> getTranslationArray(FromType sourceEncoding)
|
||||
std::span<const signed char> getTranslationArray(FromType sourceEncoding)
|
||||
{
|
||||
switch (sourceEncoding)
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define COMPONENTS_TOUTF8_H
|
||||
|
||||
#include <cstring>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
@ -50,7 +51,7 @@ namespace ToUTF8
|
|||
inline void copyFromArrayLegacyEnc(
|
||||
std::string_view::iterator& chp, std::string_view::iterator end, char*& out) const;
|
||||
|
||||
const std::basic_string_view<signed char> mTranslationArray;
|
||||
const std::span<const signed char> mTranslationArray;
|
||||
};
|
||||
|
||||
class Utf8Encoder
|
||||
|
|
2
extern/sol3/README.md
vendored
2
extern/sol3/README.md
vendored
|
@ -1,3 +1,5 @@
|
|||
The code in this directory is copied from https://github.com/ThePhD/sol2.git (64096348465b980e2f1d0e5ba9cbeea8782e8f27)
|
||||
|
||||
Additional changes include cherry-picking upstream commit d805d027e0a0a7222e936926139f06e23828ce9f to fix compilation under Clang 19.
|
||||
|
||||
License: MIT
|
||||
|
|
3
extern/sol3/sol/optional_implementation.hpp
vendored
3
extern/sol3/sol/optional_implementation.hpp
vendored
|
@ -2191,7 +2191,8 @@ namespace sol {
|
|||
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
|
||||
|
||||
*this = nullopt;
|
||||
this->construct(std::forward<Args>(args)...);
|
||||
new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
|
||||
return **this;
|
||||
}
|
||||
|
||||
/// Swaps this optional with the other.
|
||||
|
|
Loading…
Reference in a new issue