mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 18:55:29 +00:00
[fnd] Initialise memory in Vec.
This commit is contained in:
parent
7ce716180f
commit
5b9b85a7c4
|
@ -146,6 +146,11 @@ namespace fnd
|
|||
{
|
||||
fnd::Exception("Vec", "Failed to allocate memory for vector");
|
||||
}
|
||||
for (size_t i = 0; i < new_size; i++)
|
||||
{
|
||||
m_Vec[i] = 0;
|
||||
}
|
||||
|
||||
m_Size = new_size;
|
||||
}
|
||||
|
||||
|
@ -159,6 +164,10 @@ namespace fnd
|
|||
{
|
||||
fnd::Exception("Vec", "Failed to allocate memory for vector");
|
||||
}
|
||||
for (size_t i = 0; i < new_size; i++)
|
||||
{
|
||||
new_vec[i] = 0;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < _MIN(m_Size, new_size); i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue