Commit 296d9c99 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'cpp-check-fixes' into 'master'

Cpp check fixes

Fixed various cppcheck warnings

See merge request !25
parents 30f49c09 e828e0b4
.project
.cproject
......@@ -459,7 +459,6 @@ void Texture2D::buildMipMaps( GLenum _internalfmt,
// compute number of mipmaps
Vec2i curSize = Vec2i(_width, _height);
int curOffset = 0;
std::vector<int> mipMemsize(1, 0);
std::vector<Vec2i> mipSize(1, curSize);
......
......@@ -86,7 +86,7 @@ public: //---------------------------------------------------------------------
public: //---------------------------------------------------------------------
BSPImplT(const Traits& _traits, const Scalar _infinity = std::numeric_limits<Scalar>::infinity()) :
BSPImplT(const Traits& _traits, const Scalar& _infinity = std::numeric_limits<Scalar>::infinity()) :
BSPCore(_traits),
infinity_(_infinity) {}
~BSPImplT() {}
......
......@@ -76,7 +76,7 @@ public:
typedef BSPImplT< TriangleBSPCoreT<BSPTraits> > Base;
typedef typename Base::Scalar Scalar;
TriangleBSPT(const BSPTraits& _traits,
const Scalar _infinity = std::numeric_limits<Scalar>::infinity()) : Base(_traits, _infinity) {}
const Scalar& _infinity = std::numeric_limits<Scalar>::infinity()) : Base(_traits, _infinity) {}
};
//== CLASS DEFINITION =========================================================
......
......@@ -310,8 +310,9 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode)
// using static bitflags for drawmodes is no longer recommended
// read from properties instead:
bool shaded = false,
smooth = false,
bool shaded = false;
bool smooth = false;
bool
wires = ((this->drawMode() == DrawModes::DEFAULT) ||
this->drawMode().getLayerIndexByPrimitive(DrawModes::PRIMITIVE_WIREFRAME) >= 0 ||
_drawMode.getLayerIndexByPrimitive(DrawModes::PRIMITIVE_WIREFRAME) >= 0),
......
......@@ -69,7 +69,7 @@ if (QT4_FOUND)
message(STATUS "Using QT4 for OpenFlipper")
elseif(QT5_FOUND)
message(STATUS "Using QT5 for OpenFlipper")
set (OF_MAX_QT_VERSION "5.3.2")
set (OF_MAX_QT_VERSION "5.5.0")
if (${Qt5Core_VERSION_STRING} STRGREATER ${OF_MAX_QT_VERSION})
message(WARNING "Detected QT Version higher than ${OF_MAX_QT_VERSION}!\n"
"OpenFlipper has not been tested with this QT Version on Windows.")
......
......@@ -1649,12 +1649,12 @@ void
BSplineSurfaceNodeT<BSplineSurfaceType>::
updateTexBuffers()
{
size_t knotBufSizeU = bsplineSurface_.get_knots_m().size();
size_t knotBufSizeV = bsplineSurface_.get_knots_n().size();
const size_t knotBufSizeU = bsplineSurface_.get_knots_m().size();
const size_t knotBufSizeV = bsplineSurface_.get_knots_n().size();
const size_t numControlPointsU = bsplineSurface_.n_control_points_m();
const size_t numControlPointsV = bsplineSurface_.n_control_points_n();
size_t numControlPointsU = bsplineSurface_.n_control_points_m();
size_t numControlPointsV = bsplineSurface_.n_control_points_n();
size_t controlPointBufSize = numControlPointsU * numControlPointsV;
if (knotBufSizeU)
{
......@@ -1678,6 +1678,9 @@ updateTexBuffers()
#ifdef GL_VERSION_3_0
const size_t controlPointBufSize = numControlPointsU * numControlPointsV;
if (controlPointBufSize)
{
std::vector<float> controlPointBuf(controlPointBufSize * 3);
......
......@@ -125,7 +125,7 @@ struct DLLEXPORT PostProcessorOutput
// in/out format descriptor
struct PostProcessorFormatDesc
{
PostProcessorFormatDesc(bool _multisampled = false) : supportMultisampling_(_multisampled)
PostProcessorFormatDesc(bool _multisampled = false) : supportMultisampling_(_multisampled),outputFormat_(PostProcessorFormat_DONTCARE)
{}
......
......@@ -128,6 +128,7 @@ PolyLinePlugin::PolyLinePlugin() :
mergeAction_(0),
splitAction_(0),
cutAction_(0),
cutMultipleAction_(0),
cur_insert_id_(-1),
cur_polyline_obj_(0),
cur_move_id_(-1),
......
......@@ -123,7 +123,11 @@ edgeType_(0),
halfedgeType_(0),
faceType_(0),
allSupportedTypes_(0u),
conversionDialog_(0) {
conversionDialog_(0),
colorButtonSelection_(0),
colorButtonArea_(0),
colorButtonHandle_(0),
colorButtonFeature_(0){
}
MeshObjectSelectionPlugin::~MeshObjectSelectionPlugin() {
......
Supports Markdown
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