mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Add proper move constructors to UnlocalizedString
This commit is contained in:
@@ -102,6 +102,14 @@ EXPORT_MODULE namespace hex {
|
||||
UnlocalizedString(const std::string &string) : m_unlocalizedString(string) { }
|
||||
UnlocalizedString(const char *string) : m_unlocalizedString(string) { }
|
||||
UnlocalizedString(const Lang& arg) = delete;
|
||||
UnlocalizedString(std::string &&string) : m_unlocalizedString(std::move(string)) { }
|
||||
UnlocalizedString(UnlocalizedString &&) = default;
|
||||
UnlocalizedString(const UnlocalizedString &) = default;
|
||||
|
||||
UnlocalizedString &operator=(const UnlocalizedString &) = default;
|
||||
UnlocalizedString &operator=(UnlocalizedString &&) = default;
|
||||
UnlocalizedString &operator=(const std::string &string) { m_unlocalizedString = string; return *this; }
|
||||
UnlocalizedString &operator=(std::string &&string) { m_unlocalizedString = std::move(string); return *this; }
|
||||
|
||||
[[nodiscard]] operator std::string() const {
|
||||
return m_unlocalizedString;
|
||||
|
||||
Reference in New Issue
Block a user