Commit e8d03b9c authored by Ben Boeckel's avatar Ben Boeckel Committed by Ben Boeckel
Browse files

vtkOSPRayPass: avoid needless memory gymnastics

parent 322f967c
Pipeline #26755 passed with stage
...@@ -80,12 +80,10 @@ vtkOSPRayPass::vtkOSPRayPass() ...@@ -80,12 +80,10 @@ vtkOSPRayPass::vtkOSPRayPass()
} }
int ac =args.size()+1; int ac =args.size()+1;
const char** av = new const char*[ac]; const char** av = new const char*[ac];
av[0] = new char[512]; av[0] = "pvOSPRay";
strcpy(av[0],"pvOSPRay\0");
for(int i=1;i < ac; i++) for(int i=1;i < ac; i++)
{ {
av[i] = new char[args[i-1].size()+1]; av[i] = args[i - 1].c_str();
strcpy(av[i], args[i-1].c_str());
} }
try try
{ {
......
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