Skip to content

Commit

Permalink
Address compiler warnings: explicitly cast types in comparison
Browse files Browse the repository at this point in the history
operators.
  • Loading branch information
kris-rowe committed Dec 11, 2023
1 parent 77e74ad commit 19a8922
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ namespace occa {

OCCA_ERROR("Destination memory has size [" << modeMemory->size << "],"
<< " trying to access [" << offset_ << ", " << (offset_ + bytes) << "]",
(bytes + offset_) <= modeMemory->size);
udim_t(bytes + offset_) <= modeMemory->size);

modeMemory->copyFrom(src, bytes, offset_, props);
}
Expand Down Expand Up @@ -232,11 +232,11 @@ namespace occa {

OCCA_ERROR("Source memory has size [" << src.modeMemory->size << "],"
<< " trying to access [" << srcOffset_ << ", " << (srcOffset_ + bytes) << "]",
(bytes + srcOffset_) <= src.modeMemory->size);
udim_t(bytes + srcOffset_) <= src.modeMemory->size);

OCCA_ERROR("Destination memory has size [" << modeMemory->size << "],"
<< " trying to access [" << destOffset_ << ", " << (destOffset_ + bytes) << "]",
(bytes + destOffset_) <= modeMemory->size);
udim_t(bytes + destOffset_) <= modeMemory->size);

modeMemory->copyFrom(src.modeMemory, bytes, destOffset_, srcOffset_, props);
}
Expand All @@ -259,7 +259,7 @@ namespace occa {

OCCA_ERROR("Source memory has size [" << modeMemory->size << "],"
<< " trying to access [" << offset_ << ", " << (offset_ + bytes) << "]",
(bytes + offset_) <= modeMemory->size);
udim_t(bytes + offset_) <= modeMemory->size);

modeMemory->copyTo(dest, bytes, offset_, props);
}
Expand Down Expand Up @@ -288,11 +288,11 @@ namespace occa {

OCCA_ERROR("Source memory has size [" << modeMemory->size << "],"
<< " trying to access [" << srcOffset_ << ", " << (srcOffset_ + bytes) << "]",
(bytes + srcOffset_) <= modeMemory->size);
udim_t(bytes + srcOffset_) <= modeMemory->size);

OCCA_ERROR("Destination memory has size [" << dest.modeMemory->size << "],"
<< " trying to access [" << destOffset_ << ", " << (destOffset_ + bytes) << "]",
(bytes + destOffset_) <= dest.modeMemory->size);
udim_t(bytes + destOffset_) <= dest.modeMemory->size);

dest.modeMemory->copyFrom(modeMemory, bytes, destOffset_, srcOffset_, props);
}
Expand Down

0 comments on commit 19a8922

Please sign in to comment.