Skip to content

Commit

Permalink
GeneratorInterface/Core: drop VLA of non-POD type
Browse files Browse the repository at this point in the history
The patch resolves Clang compile errors regarding usage of VLA with
non-POD types. VLA are not part of C++ standard. It's GNU extension
originating from GCC. Use a standard array on the heap instead as
performance is not a priority in endJob().

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
  • Loading branch information
David Abdurachmanov authored and David Abdurachmanov committed Nov 8, 2014
1 parent 7123637 commit f7af123
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GeneratorInterface/Core/plugins/GenXSecAnalyzer.cc
Expand Up @@ -377,7 +377,7 @@ GenXSecAnalyzer::endJob() {

const int sizeOfInfos= theProcesses_size+1;
const int last = sizeOfInfos-1;
std::string title[sizeOfInfos];
std::string * title = new std::string[sizeOfInfos];

for(int i=0; i < sizeOfInfos; i++){

Expand Down Expand Up @@ -425,6 +425,7 @@ GenXSecAnalyzer::endJob() {


}
delete [] title;

edm::LogPrint("GenXSecAnalyzer")
<< "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------";
Expand Down

0 comments on commit f7af123

Please sign in to comment.