summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-02-07 15:28:26 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-02-08 14:39:02 +0100
commita922339a8a5a8d7a9672988551c5f15150afcd0e (patch)
treea007ff29aba2ca7c187c8dc931ede98eb33a7622 /src
parentd85a660f064e8130b27e11c7fd762221c754c315 (diff)
downloadastra-a922339a8a5a8d7a9672988551c5f15150afcd0e.tar.gz
astra-a922339a8a5a8d7a9672988551c5f15150afcd0e.tar.bz2
astra-a922339a8a5a8d7a9672988551c5f15150afcd0e.tar.xz
astra-a922339a8a5a8d7a9672988551c5f15150afcd0e.zip
Fix warnings
Diffstat (limited to 'src')
-rw-r--r--src/CompositeGeometryManager.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/CompositeGeometryManager.cpp b/src/CompositeGeometryManager.cpp
index 74466db..a4dace2 100644
--- a/src/CompositeGeometryManager.cpp
+++ b/src/CompositeGeometryManager.cpp
@@ -328,6 +328,7 @@ static std::pair<double, double> reduceProjectionVertical(const CVolumeGeometry3
// reduce self to only cover intersection with projection of VolumePart
// (Project corners of volume, take bounding box)
+ assert(pProjGeom->getProjectionCount() > 0);
for (int i = 0; i < pProjGeom->getProjectionCount(); ++i) {
double vol_u[8];
@@ -426,9 +427,9 @@ bool CCompositeGeometryManager::CPart::isFull() const
{
size_t x, y, z;
getDims(x, y, z);
- return x == pData->getWidth() &&
- y == pData->getHeight() &&
- z == pData->getDepth();
+ return x == (size_t)pData->getWidth() &&
+ y == (size_t)pData->getHeight() &&
+ z == (size_t)pData->getDepth();
}
bool CCompositeGeometryManager::CPart::canSplitAndReduce() const
@@ -805,7 +806,7 @@ void CCompositeGeometryManager::CVolumePart::splitX(CCompositeGeometryManager::T
size_t blockSize = computeLinearSplit(m, div, sliceCount);
int rem = blockSize - (sliceCount % blockSize);
- if (rem == blockSize)
+ if ((size_t)rem == blockSize)
rem = 0;
ASTRA_DEBUG("From %d to %d step %d", -(rem / 2), sliceCount, blockSize);
@@ -856,7 +857,7 @@ void CCompositeGeometryManager::CVolumePart::splitY(CCompositeGeometryManager::T
size_t blockSize = computeLinearSplit(m, div, sliceCount);
int rem = blockSize - (sliceCount % blockSize);
- if (rem == blockSize)
+ if ((size_t)rem == blockSize)
rem = 0;
ASTRA_DEBUG("From %d to %d step %d", -(rem / 2), sliceCount, blockSize);
@@ -907,7 +908,7 @@ void CCompositeGeometryManager::CVolumePart::splitZ(CCompositeGeometryManager::T
size_t blockSize = computeLinearSplit(m, div, sliceCount);
int rem = blockSize - (sliceCount % blockSize);
- if (rem == blockSize)
+ if ((size_t)rem == blockSize)
rem = 0;
ASTRA_DEBUG("From %d to %d step %d", -(rem / 2), sliceCount, blockSize);
@@ -1028,7 +1029,7 @@ void CCompositeGeometryManager::CProjectionPart::splitX(CCompositeGeometryManage
size_t blockSize = computeLinearSplit(m, div, sliceCount);
int rem = blockSize - (sliceCount % blockSize);
- if (rem == blockSize)
+ if ((size_t)rem == blockSize)
rem = 0;
ASTRA_DEBUG("From %d to %d step %d", -(rem / 2), sliceCount, blockSize);
@@ -1076,7 +1077,7 @@ void CCompositeGeometryManager::CProjectionPart::splitZ(CCompositeGeometryManage
size_t blockSize = computeLinearSplit(m, div, sliceCount);
int rem = blockSize - (sliceCount % blockSize);
- if (rem == blockSize)
+ if ((size_t)rem == blockSize)
rem = 0;
ASTRA_DEBUG("From %d to %d step %d", -(rem / 2), sliceCount, blockSize);