Commit 881e2726 authored by Jan Möbius's avatar Jan Möbius

Fixed some cppcheck warnings

parent bb5e2393
......@@ -149,14 +149,13 @@ bool QtBaseViewer::pick( SceneGraph::PickTarget _pickTarget,
if ( hits > 0 )
{
GLuint *ptr = &selectionBuffer[0],
num_names,
z,
min_z=~(0u),
max_z=0;
for (int i=0; i<hits; ++i)
{
num_names = *ptr++;
const GLuint num_names = *ptr++;
if ( num_names != NAME_STACK_SIZE )
{
std::cerr << "QtBaseViewer::pick() : namestack error\n\n";
......
......@@ -607,7 +607,6 @@ void LightNode::setParameters(GLenum _index, LightSource& _light)
glLightfv(_index, GL_SPECULAR, specular);
Vec3d& sd = _light.realSpotDirection_;
GLfloat dir[3] = {(float)sd[0], (float)sd[1], (float)sd[2]};
bool directional = _light.directional();
......@@ -616,7 +615,11 @@ void LightNode::setParameters(GLenum _index, LightSource& _light)
glLightfv(_index, GL_POSITION, realPos);
if(!directional) glLightfv(_index, GL_SPOT_DIRECTION, dir);
if(!directional) {
GLfloat dir[3] = {(float)sd[0], (float)sd[1], (float)sd[2]};
glLightfv(_index, GL_SPOT_DIRECTION, dir);
}
if(!directional) glLightf(_index, GL_SPOT_EXPONENT, _light.spotExponent_);
if(!directional) glLightf(_index, GL_SPOT_CUTOFF, _light.spotCutoff_);
......
......@@ -53,7 +53,8 @@
PostProcessorInput::PostProcessorInput( GLuint _colTex, GLuint _depthTex, int _width, int _height) : colorTex_(_colTex), depthTex_(_depthTex), width(_width), height(_height), sampleCount_(0)
PostProcessorInput::PostProcessorInput( GLuint _colTex, GLuint _depthTex, int _width, int _height) :
colorTex_(_colTex), depthTex_(_depthTex), width(_width), height(_height), sampleCount_(0), texfmt_(0)
{
view_.identity();
proj_.identity();
......
......@@ -82,7 +82,6 @@ struct DLLEXPORT PostProcessorInput
// format of color tex
GLuint texfmt_;
// view and projection matrix
ACG::GLMatrixf view_;
ACG::GLMatrixf proj_;
......
......@@ -502,10 +502,10 @@ bool LicenseManager::authenticate() {
// ===============================================================================================
// Check License or generate request
// ===============================================================================================
bool alreadyExpired = true;
if (!elements.empty()) //valid file was found
{
// Check expiry date
QDate currentDate = QDate::currentDate();
QDate expiryDate = QDate::fromString(elements[1],Qt::ISODate);
......@@ -522,16 +522,11 @@ bool LicenseManager::authenticate() {
macFound = true;
}
if (timestampOk()) {
alreadyExpired = false;
}
if ( !signatureOk ) {
authstring_ += tr("License Error: The license file signature for Plugin \"") + name() + tr("\" is invalid!\n\n");
} else if ( expired ) {
authstring_ += tr("License Error: The license for plugin \"") + name() + tr("\" has expired on ") + elements[1] + "!\n\n";
} else if ( alreadyExpired ) {
} else if ( !timestampOk() ) {
authstring_ += tr("License Error: System time has been reset. The license for plugin \"") + name() + tr("\" has been expired!\n\n");
} else if ( elements[2] != pluginFileName() ) {
authstring_ += tr("License Error: The license file contains plugin name\"") + elements[2] + tr("\" but this is plugin \"") + name() + "\"!\n\n";
......
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