Commit a7c1e91a authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed various cppcheck issues and compiler warnings

parent ef127d10
......@@ -78,7 +78,7 @@ namespace campvis {
throw tgt::FileException("Unknown identifier in vtk file.", p_url.getValue());
// next line is the header - contains only unimportant data
curLine = getTrimmedLine(file);
getTrimmedLine(file);
// this line is the format
curLine = StringUtils::lowercase(getTrimmedLine(file));
......@@ -117,7 +117,6 @@ namespace campvis {
void VtkImageReader::parseStructuredPoints(DataContainer& data, std::ifstream& file) throw (tgt::Exception, std::exception) {
// init optional parameters with sane default values
std::string url;
size_t dimensionality = 3;
tgt::svec3 size(static_cast<size_t>(0));
......
......@@ -40,6 +40,8 @@ namespace campvis {
, _imageReader()
, _resampler(&_canvasSize)
, _ve(&_canvasSize)
, _glr(nullptr)
, _glr2(nullptr)
{
addProcessor(&_imageReader);
addProcessor(&_resampler);
......
......@@ -53,7 +53,6 @@ namespace campvis {
void operator() (const tbb::blocked_range<size_t>& range) const {
for (size_t i = range.begin(); i != range.end(); ++i) {
tgt::svec3 pos = _intensities->getParent()->indexToPosition(i);
const tgt::svec3& size = _intensities->getSize();
const tgt::vec4& gradient = _gradients->getElement(i);
float fl = _intensities->getElementNormalized(i, 0);
......@@ -183,7 +182,7 @@ namespace campvis {
WeaklyTypedPointer wtp(WeaklyTypedPointer::FLOAT, 1, tmp);
ImageData* imgTex = new ImageData(2, tgt::svec3(256, 256, 1), 1);
ImageRepresentationGL* tex = ImageRepresentationGL::create(imgTex, wtp);
ImageRepresentationGL::create(imgTex, wtp);
delete [] tmp;
data.addData("foo", imgTex);
......
......@@ -81,7 +81,6 @@ namespace campvis {
if (img != 0) {
if (img->getDimensionality() == 3) {
const tgt::Camera& cam = p_camera.getValue();
const tgt::svec3& imgSize = img->getSize();
// Creating the slice proxy geometry works as follows:
// Create the cube proxy geometry for the volume, then clip the cube against the slice plane.
......
......@@ -189,7 +189,6 @@ namespace campvis {
_shader->setUniform("_renderBackground", true);
vrImage->bind(_shader, colorUnit, depthUnit);
float ratio = static_cast<float>(vrs.x) / static_cast<float>(rts.x);
_shader->setUniform("_modelMatrix", tgt::mat4::createScale(tgt::vec3(vrs.x, vrs.y, .5f)));
_shader->setUniform("_viewMatrix", tgt::mat4::createTranslation(tgt::vec3(srs.x, 0.f, 0.f)));
_quad->render(GL_POLYGON);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment