forked from qt-creator/qt-creator
Utils: Activate copy constructor and assignment
The move only patter is quite powerful but has the drawback that some STL algorithms get quite complicated. For short string or const references should be not difference to a move. So we activate them for all cases. Change-Id: I959c13796e69c45f31bb0ecbbe64a70d39961e3f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -155,10 +155,6 @@ public:
|
||||
Memory::deallocate(m_data.allocated.data.pointer);
|
||||
}
|
||||
|
||||
#if !defined(UNIT_TESTS) && !(defined(_MSC_VER) && _MSC_VER < 1900)
|
||||
BasicSmallString(const BasicSmallString &other) = delete;
|
||||
BasicSmallString &operator=(const BasicSmallString &other) = delete;
|
||||
#else
|
||||
BasicSmallString(const BasicSmallString &string)
|
||||
{
|
||||
if (string.isShortString() || string.isReadOnlyReference())
|
||||
@@ -175,7 +171,6 @@ public:
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
BasicSmallString(BasicSmallString &&other) noexcept
|
||||
{
|
||||
|
Reference in New Issue
Block a user