History

explicit casts to remove warnings

Andrew Meadows committed 12 years ago

Commit 9079c3e1 parent fbf46004 files · +7 −6Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 4 files). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+3−2
@@ -185,10 +185,11 @@ int MetavoxelSystem::SimulateVisitor::visit(MetavoxelInfo& info) { · 184 unmodified lines
185185 }
186186 QRgb color = info.inputValues.at(0).getInlineValue<QRgb>();
187187 QRgb normal = info.inputValues.at(1).getInlineValue<QRgb>();
188− int alpha = qAlpha(color);
188+ quint8 alpha = qAlpha(color);
189189 if (alpha > 0) {
190190 Point point = { glm::vec4(info.minimum + glm::vec3(info.size, info.size, info.size) * 0.5f, info.size),
191− { qRed(color), qGreen(color), qBlue(color), alpha }, { qRed(normal), qGreen(normal), qBlue(normal) } };
191+ { quint8(qRed(color)), quint8(qGreen(color)), quint8(qBlue(color)), alpha },
192+ { quint8(qRed(normal)), quint8(qGreen(normal)), quint8(qBlue(normal)) } };
192193 _points.append(point);
193194 }
194195 return STOP_RECURSION;