Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
e3004a65
Commit
e3004a65
authored
Apr 07, 2002
by
Andy Cedilnik
Browse files
Remove a whole bunch of warnings on Visual Studio .NET
parent
433d4a4d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Common/Testing/Cxx/vtkRegressionTestImage.h
View file @
e3004a65
...
...
@@ -291,12 +291,12 @@ char* vtkRegressionTester::IncrementFileName(const char* fname,
char
counts
[
256
];
sprintf
(
counts
,
"%d"
,
count
);
int
orgLen
=
strlen
(
fname
);
int
orgLen
=
static_cast
<
int
>
(
strlen
(
fname
)
)
;
if
(
orgLen
<
5
)
{
return
0
;
}
int
extLen
=
strlen
(
counts
);
int
extLen
=
static_cast
<
int
>
(
strlen
(
counts
)
)
;
char
*
newFileName
=
new
char
[
orgLen
+
extLen
+
2
];
strcpy
(
newFileName
,
fname
);
...
...
Common/Testing/Cxx/vtkTestUtilities.h
View file @
e3004a65
...
...
@@ -142,7 +142,7 @@ char* vtkTestUtilities::ExpandFileNameWithArgOrEnvOrDefault(const char* arg,
fullName
=
new
char
[
strlen
(
value
)
+
strlen
(
fname
)
+
2
+
(
slash
?
1
:
0
)];
fullName
[
0
]
=
0
;
strcat
(
fullName
,
value
);
int
len
=
strlen
(
fullName
);
int
len
=
static_cast
<
int
>
(
strlen
(
fullName
)
)
;
fullName
[
len
]
=
'/'
;
fullName
[
len
+
1
]
=
0
;
strcat
(
fullName
,
fname
);
...
...
Graphics/vtkMergeFilter.cxx
View file @
e3004a65
...
...
@@ -23,7 +23,7 @@
#include "vtkRectilinearGrid.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro
(
vtkMergeFilter
,
"1.6
4
"
);
vtkCxxRevisionMacro
(
vtkMergeFilter
,
"1.6
5
"
);
vtkStandardNewMacro
(
vtkMergeFilter
);
class
vtkFieldNode
...
...
@@ -31,7 +31,7 @@ class vtkFieldNode
public:
vtkFieldNode
(
const
char
*
name
,
vtkDataSet
*
ptr
=
0
)
{
int
length
=
strlen
(
name
);
int
length
=
static_cast
<
int
>
(
strlen
(
name
)
)
;
if
(
length
>
0
)
{
this
->
Name
=
new
char
[
length
+
1
];
...
...
Hybrid/vtk3DSImporter.cxx
View file @
e3004a65
...
...
@@ -22,7 +22,7 @@
#include "vtkStripper.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro
(
vtk3DSImporter
,
"1.2
6
"
);
vtkCxxRevisionMacro
(
vtk3DSImporter
,
"1.2
7
"
);
vtkStandardNewMacro
(
vtk3DSImporter
);
static
Colour
Black
=
{
0.0
,
0.0
,
0.0
};
...
...
@@ -1135,7 +1135,7 @@ static void cleanup_name (char *name)
strcpy
(
tmp
,
&
name
[
i
]);
/* Remove any trailing blanks or quotes */
for
(
i
=
strlen
(
tmp
)
-
1
;
i
>=
0
;
i
--
)
for
(
i
=
static_cast
<
int
>
(
strlen
(
tmp
)
)
-
1
;
i
>=
0
;
i
--
)
{
if
(
isprint
(
tmp
[
i
])
&&
!
isspace
(
tmp
[
i
])
&&
tmp
[
i
]
!=
'"'
)
{
...
...
Hybrid/vtkLegendBoxActor.cxx
View file @
e3004a65
...
...
@@ -25,7 +25,7 @@
#include "vtkTransform.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro
(
vtkLegendBoxActor
,
"1.1
8
"
);
vtkCxxRevisionMacro
(
vtkLegendBoxActor
,
"1.1
9
"
);
vtkStandardNewMacro
(
vtkLegendBoxActor
);
vtkLegendBoxActor
::
vtkLegendBoxActor
()
...
...
@@ -405,7 +405,7 @@ int vtkLegendBoxActor::RenderOpaqueGeometry(vtkViewport *viewport)
str
=
this
->
TextMapper
[
i
]
->
GetInput
();
if
(
str
)
//if there is a string
{
length
=
strlen
(
str
);
length
=
static_cast
<
int
>
(
strlen
(
str
)
)
;
if
(
length
>
maxLength
)
{
maxLength
=
length
;
...
...
Hybrid/vtkVRMLImporter.cxx
View file @
e3004a65
...
...
@@ -4228,7 +4228,7 @@ YY_MALLOC_DECL
#define YY_BREAK break;
#endif
vtkCxxRevisionMacro
(
vtkVRMLImporter
,
"1.4
8
"
);
vtkCxxRevisionMacro
(
vtkVRMLImporter
,
"1.4
9
"
);
vtkStandardNewMacro
(
vtkVRMLImporter
);
vtkPoints
*
vtkVRMLImporter
::
PointsNew
()
...
...
@@ -6268,8 +6268,10 @@ vtkVRMLImporter::GetVRMLDEFObject(const char *name)
static
void
memyyInput
(
char
*
buf
,
int
&
result
,
int
max_size
)
{
result
=
strlen
(
strncpy
(
buf
,
standardNodes
[
memyyInput_i
],
max_size
));
memyyInput_j
=
result
-
strlen
(
standardNodes
[
memyyInput_i
]);
result
=
static_cast
<
int
>
(
strlen
(
strncpy
(
buf
,
standardNodes
[
memyyInput_i
],
max_size
)));
memyyInput_j
=
result
-
static_cast
<
int
>
(
strlen
(
standardNodes
[
memyyInput_i
]));
if
(
memyyInput_j
==
0
)
{
memyyInput_i
++
;
...
...
@@ -6284,7 +6286,7 @@ static void defyyInput(char *buf, int &result, int max_size) {
result
=
c
==
EOF
?
0
:
1
;
buf
[
0
]
=
(
char
)
c
;
}
else
if
(
((
result
=
fread
(
buf
,
1
,
max_size
,
yyin
))
==
0
)
else
if
(
((
result
=
static_cast
<
int
>
(
fread
(
buf
,
1
,
max_size
,
yyin
))
)
==
0
)
&&
ferror
(
yyin
)
)
{
YY_FATAL_ERROR
(
"input in flex scanner failed"
);
...
...
IO/vtkMCubesReader.cxx
View file @
e3004a65
...
...
@@ -24,7 +24,7 @@
#include <sys/types.h>
#include <sys/stat.h>
vtkCxxRevisionMacro
(
vtkMCubesReader
,
"1.5
7
"
);
vtkCxxRevisionMacro
(
vtkMCubesReader
,
"1.5
8
"
);
vtkStandardNewMacro
(
vtkMCubesReader
);
// Construct object with FlipNormals turned off and Normals set to true.
...
...
@@ -188,7 +188,8 @@ void vtkMCubesReader::Execute()
for
(
j
=
0
;
j
<
3
;
j
++
)
{
int
val
;
val
=
fread
(
&
point
,
static_cast
<
int
>
(
sizeof
(
pointType
)),
1
,
fp
);
val
=
static_cast
<
int
>
(
fread
(
&
point
,
static_cast
<
int
>
(
sizeof
(
pointType
)),
1
,
fp
));
if
(
val
!=
1
)
{
vtkErrorMacro
(
<<
"Error reading triange "
<<
i
...
...
Parallel/vtkCommunicator.cxx
View file @
e3004a65
...
...
@@ -29,7 +29,7 @@
#include "vtkDoubleArray.h"
#include "vtkIdTypeArray.h"
vtkCxxRevisionMacro
(
vtkCommunicator
,
"1.1
1
"
);
vtkCxxRevisionMacro
(
vtkCommunicator
,
"1.1
2
"
);
template
<
class
T
>
static
int
SendDataArray
(
T
*
data
,
int
length
,
int
handle
,
int
tag
,
vtkCommunicator
*
self
)
...
...
@@ -149,7 +149,7 @@ int vtkCommunicator::Send(vtkDataArray* data, int remoteHandle, int tag)
int
len
=
0
;
if
(
name
)
{
len
=
strlen
(
name
)
+
1
;
len
=
static_cast
<
int
>
(
strlen
(
name
)
)
+
1
;
}
// send length of name
...
...
Parallel/vtkMultiProcessController.h
View file @
e3004a65
...
...
@@ -176,7 +176,8 @@ public:
// Description:
// Convenience method when the arg is a string.
void
TriggerRMI
(
int
remoteProcessId
,
char
*
arg
,
int
tag
)
{
this
->
TriggerRMI
(
remoteProcessId
,
(
void
*
)
arg
,
strlen
(
arg
)
+
1
,
tag
);
}
{
this
->
TriggerRMI
(
remoteProcessId
,
(
void
*
)
arg
,
static_cast
<
int
>
(
strlen
(
arg
))
+
1
,
tag
);
}
// Description:
// Convenience method when there is no argument.
...
...
Parallel/vtkPDataSetWriter.cxx
View file @
e3004a65
...
...
@@ -21,7 +21,7 @@
#include "vtkObjectFactory.h"
#include "vtkSource.h"
vtkCxxRevisionMacro
(
vtkPDataSetWriter
,
"1.
5
"
);
vtkCxxRevisionMacro
(
vtkPDataSetWriter
,
"1.
6
"
);
vtkStandardNewMacro
(
vtkPDataSetWriter
);
//----------------------------------------------------------------------------
...
...
@@ -96,7 +96,7 @@ void vtkPDataSetWriter::Write()
// Lets compute the file root from the file name supplied by the user.
length
=
strlen
(
this
->
FileName
);
length
=
static_cast
<
int
>
(
strlen
(
this
->
FileName
)
)
;
fileRoot
=
new
char
[
length
+
1
];
fileName
=
new
char
[
length
+
strlen
(
this
->
FilePattern
)
+
20
];
strncpy
(
fileRoot
,
this
->
FileName
,
length
);
...
...
Parallel/vtkPVGeometryFilter.cxx
View file @
e3004a65
...
...
@@ -24,7 +24,7 @@
#include "vtkObjectFactory.h"
#include "vtkCommand.h"
vtkCxxRevisionMacro
(
vtkPVGeometryFilter
,
"1.
9
"
);
vtkCxxRevisionMacro
(
vtkPVGeometryFilter
,
"1.
10
"
);
vtkStandardNewMacro
(
vtkPVGeometryFilter
);
//----------------------------------------------------------------------------
...
...
@@ -229,7 +229,8 @@ void vtkPVGeometryFilter::RectilinearGridExecute(vtkRectilinearGrid *input)
//----------------------------------------------------------------------------
void
vtkPVGeometryFilter
::
UnstructuredGridExecute
(
vtkUnstructuredGrid
*
input
)
void
vtkPVGeometryFilter
::
UnstructuredGridExecute
(
vtkUnstructuredGrid
*
vtkNotUsed
(
input
))
{
this
->
OutlineFlag
=
0
;
this
->
vtkDataSetSurfaceFilter
::
Execute
();
...
...
Rendering/vtkWin32TextMapper.cxx
View file @
e3004a65
...
...
@@ -18,7 +18,7 @@
#include "vtkWin32TextMapper.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro
(
vtkWin32TextMapper
,
"1.2
7
"
);
vtkCxxRevisionMacro
(
vtkWin32TextMapper
,
"1.2
8
"
);
//--------------------------------------------------------------------------
vtkWin32TextMapper
*
vtkWin32TextMapper
::
New
()
...
...
@@ -163,8 +163,10 @@ void vtkWin32TextMapper::GetSize(vtkViewport* viewport, int *size)
DT_CALCRECT
|
DT_LEFT
|
DT_NOPREFIX
);
delete
[]
wtxt
;
#else
size
[
1
]
=
DrawText
(
hdc
,
this
->
Input
,
strlen
(
this
->
Input
),
&
rect
,
DT_CALCRECT
|
DT_LEFT
|
DT_NOPREFIX
);
size
[
1
]
=
static_cast
<
int
>
(
DrawText
(
hdc
,
this
->
Input
,
static_cast
<
int
>
(
strlen
(
this
->
Input
)),
&
rect
,
DT_CALCRECT
|
DT_LEFT
|
DT_NOPREFIX
));
#endif
size
[
0
]
=
rect
.
right
-
rect
.
left
+
1
;
this
->
LastSize
[
0
]
=
size
[
0
];
...
...
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