Commit 75c18d02 authored by Robert Maynard's avatar Robert Maynard
Browse files

COMP: Fixed a unsigned / signed and a size_t warning

parent 7c7cdb38
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "vtkRenderer.h" #include "vtkRenderer.h"
#include "vtkProperty2D.h" #include "vtkProperty2D.h"
vtkCxxRevisionMacro(vtkScalarBarActor, "1.68"); vtkCxxRevisionMacro(vtkScalarBarActor, "1.69");
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 );
......
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