simplify the move constructors / move assignment operators' noexcept ifdefs

This commit is contained in:
Mamadou Babaei
2022-12-02 12:40:01 +01:00
parent c39b90f9ee
commit 9dff892854
64 changed files with 544 additions and 544 deletions
@@ -75,80 +75,80 @@ const FSGBuzzCommandImpl& FSGBuzzCommandImpl::Off()
FSGBuzzCommandImpl::FSGBuzzCommandImpl()
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>()),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const TArray<int32>& BuzzLevels)
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(FSGArrayUtils::ToStdVector<int32>(BuzzLevels))),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring,
const int32 Pinky)
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(Thumb, Index, Middle, Ring, Pinky)),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const ESGFinger Finger, const int32 BuzzLevel)
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(FSGCoreEnumCast::ToEFinger(Finger), BuzzLevel)),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const FBuzzCommandType& BuzzCommand)
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(BuzzCommand)),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const TSharedRef<FBuzzCommandType> BuzzCommand)
: FSGFingerCommandImpl(BuzzCommand),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const FSGBuzzCommandImpl& Rhs)
: FSGFingerCommandImpl(Rhs),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
{
Pimpl->Owner = this;
}
FSGBuzzCommandImpl::FSGBuzzCommandImpl(FSGBuzzCommandImpl&& Rhs)
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
noexcept
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
= default;
FSGBuzzCommandImpl::~FSGBuzzCommandImpl() = default;
@@ -162,9 +162,9 @@ FSGBuzzCommandImpl& FSGBuzzCommandImpl::operator=(const FSGBuzzCommandImpl& Rhs)
}
FSGBuzzCommandImpl& FSGBuzzCommandImpl::operator=(FSGBuzzCommandImpl&& Rhs)
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 )
#if SG_CPP17
noexcept
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 && SG_CPP17 ) */
#endif /* SG_CPP17 */
= default;
const FSGBuzzCommandImpl::FBuzzCommandType& FSGBuzzCommandImpl::ToBuzzCommand() const