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
75c18d02
Commit
75c18d02
authored
Apr 06, 2010
by
Robert Maynard
Browse files
COMP: Fixed a unsigned / signed and a size_t warning
parent
7c7cdb38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Rendering/vtkScalarBarActor.cxx
View file @
75c18d02
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "vtkRenderer.h"
#include "vtkRenderer.h"
#include "vtkProperty2D.h"
#include "vtkProperty2D.h"
vtkCxxRevisionMacro
(
vtkScalarBarActor
,
"1.6
8
"
);
vtkCxxRevisionMacro
(
vtkScalarBarActor
,
"1.6
9
"
);
vtkStandardNewMacro
(
vtkScalarBarActor
);
vtkStandardNewMacro
(
vtkScalarBarActor
);
vtkCxxSetObjectMacro
(
vtkScalarBarActor
,
LookupTable
,
vtkScalarsToColors
);
vtkCxxSetObjectMacro
(
vtkScalarBarActor
,
LookupTable
,
vtkScalarsToColors
);
...
@@ -393,9 +393,8 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
...
@@ -393,9 +393,8 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
//update with the proper title
//update with the proper title
if
(
this
->
ComponentTitle
&&
strlen
(
this
->
ComponentTitle
)
>
0
)
if
(
this
->
ComponentTitle
&&
strlen
(
this
->
ComponentTitle
)
>
0
)
{
{
//need to account for a space between title & component and null term
//need to account for a space between title & component and null term
unsigned
int
size
=
strlen
(
this
->
Title
)
+
strlen
(
this
->
ComponentTitle
)
+
2
;
char
*
combinedTitle
=
new
char
[
(
strlen
(
this
->
Title
)
+
strlen
(
this
->
ComponentTitle
)
+
2
)
];
char
*
combinedTitle
=
new
char
[
size
];
strcpy
(
combinedTitle
,
this
->
Title
);
strcpy
(
combinedTitle
,
this
->
Title
);
strcat
(
combinedTitle
,
" "
);
strcat
(
combinedTitle
,
" "
);
strcat
(
combinedTitle
,
this
->
ComponentTitle
);
strcat
(
combinedTitle
,
this
->
ComponentTitle
);
...
...
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