1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Update Vector.hpp

This commit is contained in:
Sandu Liviu Catalin 2021-02-04 00:48:34 +02:00
parent e1741ada5d
commit 508a0c3677

View File

@ -479,10 +479,10 @@ template < class T > struct SqVector
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------
* Retrieve a portion of this container. * Retrieve a portion of this container.
*/ */
SqVector Slice(SQInteger p, SQInteger n) const LightObj Slice(SQInteger p, SQInteger n) const
{ {
return SqVector(Poco::makeShared< Container >(ValidIdx(p).begin() + static_cast< size_t >(p), return LightObj(SqTypeIdentity< SqVector >{}, SqVM(), Poco::makeShared< Container >(
ValidIdx(p + n).begin() + static_cast< size_t >(p + n))); ValidIdx(p).begin() + static_cast< size_t >(p), ValidIdx(p + n).begin() + static_cast< size_t >(p + n)));
} }
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------