Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
Gauthier Quesnel
irritator
Commits
8aec163c
Commit
8aec163c
authored
Mar 29, 2020
by
Gauthier Quesnel
Browse files
array: fix array constructor
parent
03874aec
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/include/irritator/core.hpp
View file @
8aec163c
...
...
@@ -1602,7 +1602,7 @@ private:
value_type
*
items
{
nullptr
};
size_type
capacity
{
0
};
p
rivate
:
p
ublic
:
array
()
=
default
;
~
array
()
noexcept
...
...
@@ -1620,7 +1620,7 @@ private:
if
(
items
)
std
::
free
(
items
);
items
=
static_cast
<
value_type
*>
(
new_capacity
*
sizeof
(
value_type
));
static_cast
<
value_type
*>
(
std
::
malloc
(
new_capacity
*
sizeof
(
value_type
))
)
;
if
(
items
==
nullptr
)
return
status
::
block_allocator_not_enough_memory
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment