Skip to content

Commit

Permalink
fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Dec 9, 2024
1 parent f3ab091 commit df37df0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jParser/base/src/main/resources/IDLHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class IDLArray {
std::fill(data, data + size, T());
}
void copy(IDLArray<T>& src, int srcPos, int destPos, int length) {
assert(srcPos < 0 || destPos < 0 || length < 0 || srcPos + length > src.size || destPos + length > size);
assert(!(srcPos < 0 || destPos < 0 || length < 0 || srcPos + length > src.size || destPos + length > size));
std::copy(src.data + srcPos, src.data + srcPos + length, data + destPos);
}
T getValue(int index) {
assert(index < 0 || index >= size);
assert(!(index < 0 || index >= size));
return data[index];
}
void setValue(int index, T value) {
assert(index < 0 || index >= size);
assert(!(index < 0 || index >= size));
data[index] = value;
}
int getSize() { return size; }
Expand Down

0 comments on commit df37df0

Please sign in to comment.