Skip to content

Commit

Permalink
[DXFC-402] Implement adding multiple symbols and removing symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyKalin committed May 24, 2023
1 parent 9ee553d commit 706800f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/internal/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ template <RawGraalList List, auto ElementSetter> struct RawListWrapper {
return;
}

list_.size = static_cast<std::int32_t>(size);
list_.elements = new (std::nothrow) RawGraalListTraits<List>::ElementType *[list_.size];
list_.size = static_cast<typename RawGraalListTraits<List>::SizeType>(size);
list_.elements = new (std::nothrow) typename RawGraalListTraits<List>::ElementType *[list_.size];

if (!list_.elements) {
if constexpr (Debugger::traceLists) {
Expand All @@ -133,8 +133,8 @@ template <RawGraalList List, auto ElementSetter> struct RawListWrapper {

bool needToRelease = false;

for (std::int32_t i = 0; i < list_.size; i++) {
list_.elements[i] = new (std::nothrow) RawGraalListTraits<List>::ElementType{};
for (typename RawGraalListTraits<List>::SizeType i = 0; i < list_.size; i++) {
list_.elements[i] = new (std::nothrow) typename RawGraalListTraits<List>::ElementType{};

if (!list_.elements[i]) {
needToRelease = true;
Expand Down

0 comments on commit 706800f

Please sign in to comment.