mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-12 13:00:38 +00:00
Remove noexcepts from Config (#1523)
Fixes https://github.com/luau-lang/luau/issues/1515. By removing these `noexcept`s, we guarantee that the internal call to `std::swap` uses move semantics when a `Config` is copy-assigned.
This commit is contained in:
parent
53e6e4b8f0
commit
d1025d0029
2 changed files with 6 additions and 6 deletions
|
@ -21,10 +21,10 @@ constexpr const char* kConfigName = ".luaurc";
|
||||||
struct Config
|
struct Config
|
||||||
{
|
{
|
||||||
Config();
|
Config();
|
||||||
Config(const Config& other) noexcept;
|
Config(const Config& other);
|
||||||
Config& operator=(const Config& other) noexcept;
|
Config& operator=(const Config& other);
|
||||||
Config(Config&& other) noexcept = default;
|
Config(Config&& other) = default;
|
||||||
Config& operator=(Config&& other) noexcept = default;
|
Config& operator=(Config&& other) = default;
|
||||||
|
|
||||||
Mode mode = Mode::Nonstrict;
|
Mode mode = Mode::Nonstrict;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Config::Config()
|
||||||
enabledLint.setDefaults();
|
enabledLint.setDefaults();
|
||||||
}
|
}
|
||||||
|
|
||||||
Config::Config(const Config& other) noexcept
|
Config::Config(const Config& other)
|
||||||
: mode(other.mode)
|
: mode(other.mode)
|
||||||
, parseOptions(other.parseOptions)
|
, parseOptions(other.parseOptions)
|
||||||
, enabledLint(other.enabledLint)
|
, enabledLint(other.enabledLint)
|
||||||
|
@ -40,7 +40,7 @@ Config::Config(const Config& other) noexcept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Config& Config::operator=(const Config& other) noexcept
|
Config& Config::operator=(const Config& other)
|
||||||
{
|
{
|
||||||
if (this != &other)
|
if (this != &other)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue