Skip to content

Commit 95d34e7

Browse files
committed
Fixed signed/unsigned mismatches
1 parent fa3136f commit 95d34e7

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

kernels/common/scene_instance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace embree
2828
device->free(local2world);
2929
device->memoryMonitor(-ssize_t(numTimeSteps*sizeof(AffineSpace3ff)), true);
3030
if (object) object->refDec();
31-
device->memoryMonitor(-sizeof(*this), false);
31+
device->memoryMonitor(-ssize_t(sizeof(*this)), false);
3232
}
3333

3434
void Instance::setNumTimeSteps (unsigned int numTimeSteps_in)

kernels/common/scene_instance_array.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace embree
2828
}
2929
device->free(objects);
3030
}
31-
device->memoryMonitor(-sizeof(*this), false);
31+
device->memoryMonitor(-ssize_t(sizeof(*this)), false);
3232
}
3333

3434
void InstanceArray::setNumTimeSteps (unsigned int numTimeSteps_in)

tutorials/dynamic_scene/dynamic_scene_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void animateSphere (int taskIndex, int threadIndex, Vertex* vertices,
155155
const float f)
156156
{
157157
int phi = taskIndex;
158-
for (unsigned int theta=0; theta<data.numTheta; theta++)
158+
for (int theta=0; theta<data.numTheta; theta++)
159159
{
160160
Vertex* v = &vertices[phi*data.numTheta+theta];
161161
const float phif = phi*float(pi)*rcpNumPhi;

tutorials/multiscene_geometry/multiscene_geometry_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ namespace embree {
171171
const float f)
172172
{
173173
int phi = taskIndex;
174-
for (unsigned int theta = 0; theta < data.numTheta; theta++)
174+
for (int theta = 0; theta < data.numTheta; theta++)
175175
{
176176
Vertex* v = &vertices[phi * data.numTheta + theta];
177177
const float phif = phi * float(pi) * rcpNumPhi;
@@ -276,7 +276,7 @@ namespace embree {
276276
animateSphere((int)i, threadIndex, vertices, rcpNumTheta, rcpNumPhi, pos, r, f);
277277
});
278278
#else
279-
for (unsigned int phi = 0; phi < data.numPhi + 1; phi++) for (int theta = 0; theta < data.numTheta; theta++)
279+
for (int phi = 0; phi < data.numPhi + 1; phi++) for (int theta = 0; theta < data.numTheta; theta++)
280280
{
281281
Vertex* v = &vertices[phi * data.numTheta + theta];
282282
const float phif = phi * float(pi) * rcpNumPhi;

tutorials/voronoi/voronoi_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void createPoints (TutorialData& data)
125125
data.points = (Point*) alignedMalloc(data.num_points*sizeof(Point), 16);
126126
data.points_tmp = (Point*) alignedMalloc(data.num_points*sizeof(Point), 16);
127127
unsigned int geomID = rtcAttachGeometry(data.scene, geom);
128-
for (unsigned int i=0; i<data.num_points; i++) {
128+
for (int i=0; i<data.num_points; i++) {
129129
data.points[i].geometry = geom;
130130
data.points[i].geomID = geomID;
131131
data.points_tmp[i].geometry = geom;
@@ -139,7 +139,7 @@ void createPoints (TutorialData& data)
139139

140140
RandomSampler rs;
141141
RandomSampler_init(rs, 42);
142-
for (unsigned int i = 0; i < data.num_points; ++i)
142+
for (int i = 0; i < data.num_points; ++i)
143143
{
144144
float xi1 = RandomSampler_getFloat(rs);
145145
float xi2 = RandomSampler_getFloat(rs);

0 commit comments

Comments
 (0)