mirror of
https://github.com/jakcron/nstool
synced 2024-12-27 15:11:12 +00:00
[fnd] Initialise memory in Vec.
This commit is contained in:
parent
7ce716180f
commit
5b9b85a7c4
1 changed files with 9 additions and 0 deletions
|
@ -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