Core/String: Fix movement leaving a null shared string
This commit is contained in:
parent
046926e4d4
commit
9c9b9ed49f
|
|
@ -18,6 +18,7 @@ Nazara Engine:
|
|||
- Simplification of methods Matrix4::SetRotation() and Quaternion::MakeRotationBetween()
|
||||
- Fix mouve moved event generated on X11 platform when doing Mouse::SetPosition()
|
||||
- ⚠️ Reworked Flags class, replaced EnumAsFlags<E>::value by IsEnumFlag<E>::value, EnumAsFlags<E> no longer need to contains a `value` field. The `max` field can also be of the same type as the enum.
|
||||
- Fix String movement constructor, which was leaving a null shared string (which was not reusable)
|
||||
|
||||
Nazara Development Kit:
|
||||
- Added ImageWidget (#139)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Nz
|
|||
String(const char* string, std::size_t length);
|
||||
String(const std::string& string);
|
||||
String(const String& string) = default;
|
||||
String(String&& string) noexcept = default;
|
||||
inline String(String&& string) noexcept;
|
||||
~String() = default;
|
||||
|
||||
String& Append(char character);
|
||||
|
|
|
|||
|
|
@ -7,12 +7,11 @@
|
|||
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Constructs a String object with a shared string by move semantic
|
||||
*
|
||||
* \param sharedString Shared string to move into this
|
||||
*/
|
||||
inline Nz::String::String(String&& string) noexcept :
|
||||
m_sharedString(std::move(string.m_sharedString))
|
||||
{
|
||||
string.m_sharedString = GetEmptyString();
|
||||
}
|
||||
|
||||
inline String::String(std::shared_ptr<SharedString>&& sharedString) :
|
||||
m_sharedString(std::move(sharedString))
|
||||
|
|
|
|||
Loading…
Reference in New Issue