Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Christian Butz
VTK
Commits
46c70171
Commit
46c70171
authored
Mar 29, 2016
by
Sean McBride
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed all cppcheck operatorEq warnings
Changed some operator= from returning void to returning *this.
parent
d03fca63
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
14 deletions
+20
-14
CMake/VTKcppcheckSuppressions.txt
CMake/VTKcppcheckSuppressions.txt
+0
-2
Common/DataModel/vtkGenericEdgeTable.h
Common/DataModel/vtkGenericEdgeTable.h
+5
-3
Filters/General/Testing/Cxx/BoxClipTetrahedra.cxx
Filters/General/Testing/Cxx/BoxClipTetrahedra.cxx
+2
-1
IO/Geometry/vtkOpenFOAMReader.cxx
IO/Geometry/vtkOpenFOAMReader.cxx
+2
-1
IO/NetCDF/vtkSLACReader.cxx
IO/NetCDF/vtkSLACReader.cxx
+2
-1
Imaging/Morphological/vtkImageThresholdConnectivity.cxx
Imaging/Morphological/vtkImageThresholdConnectivity.cxx
+1
-1
Interaction/Widgets/vtkBalloonWidget.cxx
Interaction/Widgets/vtkBalloonWidget.cxx
+3
-1
Rendering/ParallelLIC/vtkParallelTimer.cxx
Rendering/ParallelLIC/vtkParallelTimer.cxx
+4
-3
Utilities/EncodeString/vtkEncodeString.cxx
Utilities/EncodeString/vtkEncodeString.cxx
+1
-1
No files found.
CMake/VTKcppcheckSuppressions.txt
View file @
46c70171
...
...
@@ -136,8 +136,6 @@ duplInheritedMember
invalidPointerCast
// 6 warnings
noConstructor
// not many
operatorEq
// To investigate further...
memleak:Wrapping/Tools/vtkParsePreprocess.c
...
...
Common/DataModel/vtkGenericEdgeTable.h
View file @
46c70171
...
...
@@ -153,7 +153,7 @@ public:
this
->
Reference
=
other
.
Reference
;
}
v
oi
d
operator
=
(
const
PointEntry
&
other
)
P
oi
ntEntry
&
operator
=
(
const
PointEntry
&
other
)
{
if
(
this
!=
&
other
)
{
...
...
@@ -172,6 +172,7 @@ public:
memcpy
(
this
->
Scalar
,
other
.
Scalar
,
sizeof
(
double
)
*
c
);
this
->
Reference
=
other
.
Reference
;
}
return
*
this
;
}
};
...
...
@@ -204,11 +205,11 @@ public:
this
->
CellId
=
copy
.
CellId
;
}
void
operator
=
(
const
EdgeEntry
&
entry
)
EdgeEntry
&
operator
=
(
const
EdgeEntry
&
entry
)
{
if
(
this
==
&
entry
)
{
return
;
return
*
this
;
}
this
->
E1
=
entry
.
E1
;
this
->
E2
=
entry
.
E2
;
...
...
@@ -216,6 +217,7 @@ public:
this
->
ToSplit
=
entry
.
ToSplit
;
this
->
PtId
=
entry
.
PtId
;
this
->
CellId
=
entry
.
CellId
;
return
*
this
;
}
};
//ETX
...
...
Filters/General/Testing/Cxx/BoxClipTetrahedra.cxx
View file @
46c70171
...
...
@@ -104,10 +104,11 @@ public:
this
->
Data
=
bw
.
Data
;
this
->
Data
->
Register
(
NULL
);
}
void
operator
=
(
const
BadWinding
&
bw
)
{
BadWinding
&
operator
=
(
const
BadWinding
&
bw
)
{
this
->
Data
->
UnRegister
(
NULL
);
this
->
Data
=
bw
.
Data
;
this
->
Data
->
Register
(
NULL
);
return
*
this
;
}
vtkUnstructuredGrid
*
Data
;
...
...
IO/Geometry/vtkOpenFOAMReader.cxx
View file @
46c70171
...
...
@@ -612,11 +612,12 @@ public:
this
->
Type
=
STRING
;
this
->
String
=
new
vtkStdString
(
value
);
}
v
oid
operator
=
(
const
vtkFoamToken
&
value
)
v
tkFoamToken
&
operator
=
(
const
vtkFoamToken
&
value
)
{
this
->
Clear
();
this
->
Type
=
value
.
Type
;
this
->
AssignData
(
value
);
return
*
this
;
}
bool
operator
==
(
const
char
value
)
const
{
...
...
IO/NetCDF/vtkSLACReader.cxx
View file @
46c70171
...
...
@@ -246,12 +246,13 @@ public:
(
*
this
->
ReferenceCount
)
++
;
}
v
oid
operator
=
(
const
vtkSLACReaderAutoCloseNetCDF
&
src
)
v
tkSLACReaderAutoCloseNetCDF
&
operator
=
(
const
vtkSLACReaderAutoCloseNetCDF
&
src
)
{
this
->
UnReference
();
this
->
FileDescriptor
=
src
.
FileDescriptor
;
this
->
ReferenceCount
=
src
.
ReferenceCount
;
(
*
this
->
ReferenceCount
)
++
;
return
*
this
;
}
operator
int
()
const
{
return
this
->
FileDescriptor
;
}
...
...
Imaging/Morphological/vtkImageThresholdConnectivity.cxx
View file @
46c70171
...
...
@@ -199,7 +199,7 @@ public:
vtkFloodFillSeed
(
const
vtkFloodFillSeed
&
seed
)
{
store
[
0
]
=
seed
.
store
[
0
];
store
[
1
]
=
seed
.
store
[
1
];
store
[
2
]
=
seed
.
store
[
2
];
};
const
int
&
operator
[](
int
i
)
const
{
return
store
[
i
];
};
const
vtkFloodFillSeed
&
operator
=
(
const
vtkFloodFillSeed
&
seed
)
{
vtkFloodFillSeed
&
operator
=
(
const
vtkFloodFillSeed
&
seed
)
{
store
[
0
]
=
seed
.
store
[
0
];
store
[
1
]
=
seed
.
store
[
1
];
store
[
2
]
=
seed
.
store
[
2
];
return
*
this
;
};
...
...
Interaction/Widgets/vtkBalloonWidget.cxx
View file @
46c70171
...
...
@@ -74,7 +74,7 @@ struct vtkBalloon
this
->
Image
->
UnRegister
(
NULL
);
}
}
v
oid
operator
=
(
const
vtkBalloon
&
balloon
)
v
tkBalloon
&
operator
=
(
const
vtkBalloon
&
balloon
)
{
this
->
Text
=
balloon
.
Text
;
...
...
@@ -90,6 +90,8 @@ struct vtkBalloon
{
this
->
Image
->
Register
(
NULL
);
}
return
*
this
;
}
int
operator
==
(
const
vtkBalloon
&
balloon
)
const
{
...
...
Rendering/ParallelLIC/vtkParallelTimer.cxx
View file @
46c70171
...
...
@@ -95,7 +95,7 @@ public:
~
vtkParallelTimerBuffer
();
vtkParallelTimerBuffer
(
const
vtkParallelTimerBuffer
&
other
);
v
oid
operator
=
(
const
vtkParallelTimerBuffer
&
other
);
v
tkParallelTimerBuffer
&
operator
=
(
const
vtkParallelTimerBuffer
&
other
);
// Description:
// Access state and internal data.
...
...
@@ -179,15 +179,16 @@ vtkParallelTimerBuffer::vtkParallelTimerBuffer(const vtkParallelTimerBuffer &oth
}
//-----------------------------------------------------------------------------
v
oid
vtkParallelTimerBuffer
::
operator
=
(
const
vtkParallelTimerBuffer
&
other
)
v
tkParallelTimerBuffer
&
vtkParallelTimerBuffer
::
operator
=
(
const
vtkParallelTimerBuffer
&
other
)
{
if
(
this
==
&
other
)
{
return
;
return
*
this
;
}
this
->
Clear
();
this
->
Resize
(
other
.
GetSize
());
memcpy
(
this
->
Data
,
other
.
Data
,
other
.
GetSize
());
return
*
this
;
}
//-----------------------------------------------------------------------------
...
...
Utilities/EncodeString/vtkEncodeString.cxx
View file @
46c70171
...
...
@@ -91,7 +91,7 @@ public:
{
}
Output
(
const
Output
&
);
void
operator
=
(
const
Output
&
);
Output
&
operator
=
(
const
Output
&
);
~
Output
()
{
}
...
...
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