mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-19 03:57:14 +01:00
Update Vector.hpp
This commit is contained in:
parent
f95a4f9305
commit
8d1b6576f3
@ -216,7 +216,7 @@ template < class T > struct SqVector
|
|||||||
const Reference & ValidRef() const { Validate(); return mC; }
|
const Reference & ValidRef() const { Validate(); return mC; }
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Make sure an index is within rance and return the container it. Container must exist.
|
* Make sure an index is within range and return the container. Container must exist.
|
||||||
*/
|
*/
|
||||||
Container & ValidIdx(SQInteger i)
|
Container & ValidIdx(SQInteger i)
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@ template < class T > struct SqVector
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Make sure an index is within rance and return the container it. Container must exist.
|
* Make sure an index is within range and return the container. Container must exist.
|
||||||
*/
|
*/
|
||||||
const Container & ValidIdx(SQInteger i) const
|
const Container & ValidIdx(SQInteger i) const
|
||||||
{
|
{
|
||||||
@ -623,7 +623,7 @@ template < class T > struct SqVector
|
|||||||
Validate();
|
Validate();
|
||||||
if (static_cast< size_t >(p) >= mC->size())
|
if (static_cast< size_t >(p) >= mC->size())
|
||||||
{
|
{
|
||||||
STHROWF("Invalid container index ({})", p);
|
STHROWF("Invalid container index ({} >= {})", p, mC->size());
|
||||||
}
|
}
|
||||||
for (auto i = static_cast< size_t >(p); n--; ++i)
|
for (auto i = static_cast< size_t >(p); n--; ++i)
|
||||||
{
|
{
|
||||||
@ -642,11 +642,11 @@ template < class T > struct SqVector
|
|||||||
Validate();
|
Validate();
|
||||||
if (static_cast< size_t >(p) >= mC->size())
|
if (static_cast< size_t >(p) >= mC->size())
|
||||||
{
|
{
|
||||||
STHROWF("Invalid container index (" PRINT_INT_FMT ")", p);
|
STHROWF("Invalid container index ({} >= {})", p, mC->size());
|
||||||
}
|
}
|
||||||
else if (static_cast< size_t >(p + n) >= mC->size())
|
else if (static_cast< size_t >(p + n) >= mC->size())
|
||||||
{
|
{
|
||||||
STHROWF("Invalid container index ({})", p + n);
|
STHROWF("Invalid container index ({} >= {})", p + n, mC->size());
|
||||||
}
|
}
|
||||||
for (n = (p + n); p <= n; ++p)
|
for (n = (p + n); p <= n; ++p)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user