Skip to content

Commit afb92d7

Browse files
committed
* remove variable length array declaration that violates ISO C++
language standards, introduced during the JANA2 upgrade [rtj]
1 parent 1fff4b6 commit afb92d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hdgeant4.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ int main(int argc,char** argv)
7878
}
7979
// Convert filtered_args to argc and argv format
8080
int filtered_argc = filtered_args.size();
81-
char* filtered_argv[filtered_argc];
81+
std::vector<char*> filtered_argv;
8282
for (int i = 0; i < filtered_argc; ++i) {
83-
filtered_argv[i] = const_cast<char*>(filtered_args[i].c_str());
83+
filtered_argv.push_back(const_cast<char*>(filtered_args[i].c_str()));
8484
}
8585
// Initialize the jana framework
86-
DApplication dapp(filtered_argc, filtered_argv);
86+
DApplication dapp(filtered_argc, filtered_argv.data());
8787
auto app = dapp.GetJApp();
8888
app->Initialize();
8989

0 commit comments

Comments
 (0)