Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenFlipper-Free
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenFlipper-Free
OpenFlipper-Free
Commits
6687eabe
Commit
6687eabe
authored
Nov 29, 2016
by
Christopher Tenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix several cppcheck warnings
parent
6d0648b3
Pipeline
#3751
passed with stage
in 64 minutes and 19 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
42 additions
and
34 deletions
+42
-34
ACG/GL/GLState.cc
ACG/GL/GLState.cc
+5
-5
ACG/GL/ShaderGenerator.cc
ACG/GL/ShaderGenerator.cc
+16
-4
ACG/Scenegraph/TranslationManipulatorNode.cc
ACG/Scenegraph/TranslationManipulatorNode.cc
+1
-1
ACG/ShaderUtils/UniformPool.cc
ACG/ShaderUtils/UniformPool.cc
+2
-1
ACG/ShaderUtils/UniformPool.hh
ACG/ShaderUtils/UniformPool.hh
+1
-1
ACG/Utils/Tracing.cc
ACG/Utils/Tracing.cc
+1
-1
ObjectTypes/PolyLine/PolyLineT.cc
ObjectTypes/PolyLine/PolyLineT.cc
+2
-2
ObjectTypes/PolyLine/PolyLineT.hh
ObjectTypes/PolyLine/PolyLineT.hh
+2
-2
ObjectTypes/Skeleton/JointT.cc
ObjectTypes/Skeleton/JointT.cc
+1
-1
ObjectTypes/Skeleton/JointT.hh
ObjectTypes/Skeleton/JointT.hh
+1
-1
ObjectTypes/SplatCloud/SplatCloudNode.cc
ObjectTypes/SplatCloud/SplatCloudNode.cc
+3
-8
PluginCollection-FilePlugins/Plugin-FileOBJ/FileOBJ.cc
PluginCollection-FilePlugins/Plugin-FileOBJ/FileOBJ.cc
+6
-6
PluginCollection-FilePlugins/Plugin-FileOVM/FileOpenVolumeMesh.cc
...llection-FilePlugins/Plugin-FileOVM/FileOpenVolumeMesh.cc
+1
-1
No files found.
ACG/GL/GLState.cc
View file @
6687eabe
...
...
@@ -86,7 +86,7 @@ const float GLState::default_shininess(100.f);
bool
GLState
::
depthFuncLock_
=
false
;
bool
GLState
::
depthRangeLock_
=
false
;
bool
GLState
::
blendFuncSeparateLock_
[
2
]
=
{
false
};
bool
GLState
::
blendFuncSeparateLock_
[]
=
{
false
};
bool
GLState
::
blendEquationLock_
=
false
;
bool
GLState
::
blendColorLock_
=
false
;
bool
GLState
::
alphaFuncLock_
=
false
;
...
...
@@ -101,9 +101,9 @@ bool GLState::programLock_ = false;
std
::
deque
<
GLStateContext
>
GLState
::
stateStack_
;
std
::
bitset
<
0xFFFF
+
1
>
GLState
::
glStateLock_
;
int
GLState
::
glBufferTargetLock_
[
4
]
=
{
0
};
int
GLState
::
glTextureStageLock_
[
16
]
=
{
0
};
bool
GLState
::
framebufferLock_
[
2
]
=
{
false
};
int
GLState
::
glBufferTargetLock_
[]
=
{
0
};
int
GLState
::
glTextureStageLock_
[]
=
{
0
};
bool
GLState
::
framebufferLock_
[]
=
{
false
};
int
GLState
::
maxTextureCoords_
=
0
;
int
GLState
::
maxCombinedTextureImageUnits_
=
0
;
int
GLState
::
maxDrawBuffers_
=
0
;
...
...
@@ -1142,7 +1142,7 @@ bool GLState::color_picking () const
//-----------------------------------------------------------------------------
GLenum
GLState
::
glStateCaps
[
95
]
=
{
GL_ALPHA_TEST
,
GLenum
GLState
::
glStateCaps
[]
=
{
GL_ALPHA_TEST
,
GL_AUTO_NORMAL
,
GL_MAP2_VERTEX_3
,
GL_MAP2_VERTEX_4
,
...
...
ACG/GL/ShaderGenerator.cc
View file @
6687eabe
...
...
@@ -2336,12 +2336,24 @@ void ShaderProgGenerator::scanShaderTemplate(QStringList& _templateSrc, QString
QByteArray
lineBytes
=
trimmedLine
.
toUtf8
();
int
templateVersion
=
0
;
if
(
sscanf
(
lineBytes
.
constData
(),
"#version %d"
,
&
templateVersion
)
==
1
)
if
(
trimmedLine
.
startsWith
(
"#version "
)
)
{
desc_
.
version
=
std
::
max
(
templateVersion
,
desc_
.
version
);
QStringList
tokens
=
trimmedLine
.
split
(
' '
);
// remove version line from template since this is added later in the build functions
it
=
_templateSrc
.
erase
(
it
);
if
(
tokens
.
size
()
>
1
)
{
// templateVersion
bool
convOk
=
false
;
templateVersion
=
tokens
.
at
(
1
).
toInt
(
&
convOk
);
if
(
convOk
)
{
desc_
.
version
=
std
::
max
(
templateVersion
,
desc_
.
version
);
// remove version line from template since this is added later in the build functions
it
=
_templateSrc
.
erase
(
it
);
}
}
}
// scan layout() directive
else
if
(
trimmedLine
.
startsWith
(
"layout("
)
||
trimmedLine
.
startsWith
(
"layout ("
))
...
...
ACG/Scenegraph/TranslationManipulatorNode.cc
View file @
6687eabe
...
...
@@ -966,7 +966,6 @@ TranslationManipulatorNode::mouseEvent(GLState& _state, QMouseEvent* _event)
Vec3d
oldPoint3D
;
Vec2i
newPoint2D
(
_event
->
pos
().
x
(),
_event
->
pos
().
y
());
Vec3d
newPoint3D
;
bool
rot
[
3
],
trans
[
3
];
unsigned
int
i
;
bool
lockOldPoint
=
false
;
...
...
@@ -1135,6 +1134,7 @@ TranslationManipulatorNode::mouseEvent(GLState& _state, QMouseEvent* _event)
}
// set action for the different modes
bool
rot
[
3
],
trans
[
3
];
switch
(
mode_
)
{
case
Rotation
:
for
(
i
=
0
;
i
<
3
;
i
++
)
{
...
...
ACG/ShaderUtils/UniformPool.cc
View file @
6687eabe
...
...
@@ -84,8 +84,9 @@ namespace GLSL {
}
void
UniformPool
::
operator
=
(
const
UniformPool
&
_other
)
{
UniformPool
&
UniformPool
::
operator
=
(
const
UniformPool
&
_other
)
{
addPool
(
_other
);
return
*
this
;
}
void
UniformPool
::
clear
()
{
...
...
ACG/ShaderUtils/UniformPool.hh
View file @
6687eabe
...
...
@@ -124,7 +124,7 @@ namespace GLSL {
/** \brief copy
*
*/
void
operator
=
(
const
UniformPool
&
_other
);
UniformPool
&
operator
=
(
const
UniformPool
&
_other
);
private:
struct
UniformBase
{
...
...
ACG/Utils/Tracing.cc
View file @
6687eabe
...
...
@@ -69,7 +69,7 @@ namespace ACG {
// static variables
char
Tracing
::
progress_
[
4
]
=
{
'-'
,
'\\'
,
'|'
,
'/'
};
char
Tracing
::
progress_
[]
=
{
'-'
,
'\\'
,
'|'
,
'/'
};
unsigned
char
Tracing
::
idx_
=
0
;
...
...
ObjectTypes/PolyLine/PolyLineT.cc
View file @
6687eabe
...
...
@@ -1527,8 +1527,8 @@ PolyLineT<PointT>::
edge_points_in_segment
(
const
MeshT
&
_mesh
,
const
Point
&
_p0
,
const
Point
&
_p1
,
const
typename
MeshT
::
FaceHandle
_fh0
,
const
typename
MeshT
::
FaceHandle
_fh1
,
const
typename
MeshT
::
FaceHandle
&
_fh0
,
const
typename
MeshT
::
FaceHandle
&
_fh1
,
std
::
vector
<
Point
>
&
_points
,
std
::
vector
<
typename
MeshT
::
EdgeHandle
>&
_ehandles
)
{
...
...
ObjectTypes/PolyLine/PolyLineT.hh
View file @
6687eabe
...
...
@@ -641,8 +641,8 @@ private:
void
edge_points_in_segment
(
const
MeshT
&
_mesh
,
const
Point
&
_p0
,
const
Point
&
_p1
,
const
typename
MeshT
::
FaceHandle
_fh0
,
const
typename
MeshT
::
FaceHandle
_fh1
,
const
typename
MeshT
::
FaceHandle
&
_fh0
,
const
typename
MeshT
::
FaceHandle
&
_fh1
,
std
::
vector
<
Point
>
&
_points
,
std
::
vector
<
typename
MeshT
::
EdgeHandle
>&
_ehandles
);
...
...
ObjectTypes/Skeleton/JointT.cc
View file @
6687eabe
...
...
@@ -257,7 +257,7 @@ inline std::string JointT<PointT>::name() const {
//-----------------------------------------------------------------------------------------------------
template
<
typename
PointT
>
inline
void
JointT
<
PointT
>::
setName
(
const
std
::
string
_name
)
{
inline
void
JointT
<
PointT
>::
setName
(
const
std
::
string
&
_name
)
{
name_
=
_name
;
}
...
...
ObjectTypes/Skeleton/JointT.hh
View file @
6687eabe
...
...
@@ -113,7 +113,7 @@ public:
/// Access the name of the joint
inline
std
::
string
name
()
const
;
inline
void
setName
(
const
std
::
string
_name
);
inline
void
setName
(
const
std
::
string
&
_name
);
private:
/// An unique identifier, guaranteed to be part of a continuous sequence starting from 0
...
...
ObjectTypes/SplatCloud/SplatCloudNode.cc
View file @
6687eabe
...
...
@@ -97,9 +97,9 @@ SplatCloudNode::SplatCloudNode( const SplatCloud &_splatCloud, BaseNode *_parent
defaultColor_
(
Color
(
0
,
0
,
0
)
),
defaultNormal_
(
Normal
(
0
,
0
,
0
)
),
defaultPointsize_
(
Pointsize
(
0.0
)
),
splatsDrawMode_
(
DrawModes
::
NONE
),
dotsDrawMode_
(
DrawModes
::
NONE
),
pointsDrawMode_
(
DrawModes
::
NONE
),
splatsDrawMode_
(
DrawModes
::
addDrawMode
(
"Splats"
)
),
dotsDrawMode_
(
DrawModes
::
addDrawMode
(
"Dots"
)
),
pointsDrawMode_
(
DrawModes
::
addDrawMode
(
"Points"
)
),
pickingBaseIndex_
(
0
),
pickDrawMode_
(
DrawModes
::
NONE
),
// TODO: hack, see enterPick()
vboGlId_
(
0
),
...
...
@@ -112,11 +112,6 @@ SplatCloudNode::SplatCloudNode( const SplatCloud &_splatCloud, BaseNode *_parent
vboSelectionsOffset_
(
-
1
),
vboPickColorsOffset_
(
-
1
)
{
// add (possibly) new drawmodes
pointsDrawMode_
=
DrawModes
::
addDrawMode
(
"Points"
);
dotsDrawMode_
=
DrawModes
::
addDrawMode
(
"Dots"
);
splatsDrawMode_
=
DrawModes
::
addDrawMode
(
"Splats"
);
// create a new VBO (will be invalid and rebuilt the next time drawn (or picked))
createVBO
();
}
...
...
PluginCollection-FilePlugins/Plugin-FileOBJ/FileOBJ.cc
View file @
6687eabe
...
...
@@ -1048,9 +1048,9 @@ void FileOBJPlugin::readOBJFile(QByteArray& _bufferedFile, QString _filename, OB
// Read knots at the beginning before the indices
if
(
keyWrd
==
QLatin1String
(
"curv"
)
)
{
double
trash
;
trash
=
getDouble
(
lineData
);
trash
=
getDouble
(
lineData
);
// skip next two doubles in stream
getDouble
(
lineData
);
getDouble
(
lineData
);
}
...
...
@@ -1576,9 +1576,9 @@ void FileOBJPlugin::checkTypes(QByteArray& _bufferedFile, QString _filename, OBJ
// Read knots at the beginning before the indices
if
(
keyWrd
==
QLatin1String
(
"curv"
)
)
{
double
trash
;
trash
=
getDouble
(
lineData
);
trash
=
getDouble
(
lineData
);
// skip next two doubles in stream
getDouble
(
lineData
);
getDouble
(
lineData
);
}
// work on the line until nothing left to read
...
...
PluginCollection-FilePlugins/Plugin-FileOVM/FileOpenVolumeMesh.cc
View file @
6687eabe
...
...
@@ -153,7 +153,6 @@ int FileOpenVolumeMeshPlugin::loadObject(QString _filename) {
int
id
=
-
1
;
bool
hexMesh
=
false
;
bool
tetMesh
=
false
;
if
(
!
OpenFlipper
::
Options
::
nogui
()
&&
typeCheck_
->
currentIndex
()
==
0
)
{
hexMesh
=
fileManager_
.
isHexahedralMesh
(
_filename
.
toStdString
());
...
...
@@ -162,6 +161,7 @@ int FileOpenVolumeMeshPlugin::loadObject(QString _filename) {
}
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
bool
tetMesh
=
false
;
if
(
!
OpenFlipper
::
Options
::
nogui
()
&&
typeCheck_
->
currentIndex
()
==
0
)
{
tetMesh
=
fileManager_
.
isTetrahedralMesh
(
_filename
.
toStdString
());
}
else
if
(
!
OpenFlipper
::
Options
::
nogui
()
&&
typeCheck_
->
currentIndex
()
==
3
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment